Microsoft Lesson | 1992-10-21 | 250.1 KB | 1,194 lines
Out of Memory xxx
File Missing
Unrecognized Error
Microsoft CBT
! I p
" % ( + . 1 4 7 : = @ C F I L O R U X [ ^ a d g j m p s v y |
You can also use Visual Basic code to change the color of an objectTo help you review your code quickly, Visual Basic provides:You can change the color of a field as soon as a user moveswhile your application is running. For example:Learning Visual Basic or to exit, press ALT+O.How to Use the Learning Visual Basic TutorialYou use the Menu Design window to create menuClick the Next button ( > ) to continue. ToTo return to the Learning Visual Basic Menu,Click the Menu button ( > ) to return to theLearning Visual Basic Menu. To exit, clickreturn to the Menu or exit Learning VisualWhen you're done reading the Instructions,press the SPACEBAR. To exit, press ALT+O.Click a lesson name to start that lesson.cannot be found. To run this lesson, youThe example files needed for this lessonneed to reinstall Learning Visual Basic.You can't go back from this point in thePress the PAGE DOWN key to continue withTo learn how to use the tutorial, clickthis lesson. To choose another part ofClick the Menu button to return to theCreating an Application from the Menu.for you to follow to continue with thelesson. To review the lesson, chooseclick the Close Instructions button.controls and set their properties:Trigger other event procedures.Working with Forms and Controls[Form1.frm] ForeColor: 16776960Learning Microsoft Visual Basictemperature in one of the textas File or Edit, or an item onAs an illustrated introductionChange an object's properties.the name used to refer to theIf txtName.Text = '' '' Thenspecifies a menu title, sucha menu, such as Open or Cut.MsgBox ''Enter your name.''To go backward in a lesson,Clicking the Options buttonTo go forward in a lesson,Debugging Your Application...files are being loaded.Event procedures can also:Automatic syntax checkingways to get around in theSub cmdOKButton_Click ( )opens a menu of differentpoints to an instructionscreen to an applicationreturns to Visual Basic.Event-driven programmingthe Instructions button.1. Create the interface[Form1.frm] BackColor: 0visible at design time.Closes the tutorial andMicrosoft Visual Basicbutton on the toolbar.Horizontal Scroll Barsclick the Back button.Form1.ForeColor = RGB(click the Next button.Countries of the Worldtutorial, as shown inmenu control in code.Basic, click Options.the diagram at right.Returns to the Menu.Jumps to the SummaryVertical Scroll BarstxtSales.ForeColor =''Enter your name.''ear All BreakpointsDebug Window[Form1]Programmer's Guide.Opens this window.Closes the OptionsAn event procedureDirectory List BoxcmdOKButton_ClickIncome per CapitaSyntax for eventsfor that lesson.Event proceduresThe Visual Basicoggle BreakpointRun-time errorsDebugging toolsThe applicationnstant Watch...As a dialog boxDrive List BoxKey is pressedOne minute....Compile errorsCommand ButtonThe Watch paneto that field.Returns to thethe File menu.Next Statementprevious step.A picture boxWindow[Form1]ext Statementautomaticallyrocedure Step13 - Copy PenThat's all thOption ButtonControl is drFile List BoxBorder Lakesexpressions.application.Adding Menusintroductiondeclarations= '' '' ThenEvent-DrivenClipControlsthe toolbar.Instructionsdit Watch...Next CountrytxtName.Textdouble-clickLogic errorstemperatureemphasize ienvironmenttemperatureillustratedApplication2 - SizableInformationTemperatureext CountryNext, we'llPicture Boxdd Watch...applicationThis lessoninformationprogramming-- mistakesinstructionBorderStyleNow we'll aA red arrow''DebuggingmnuFileExitdemonstrateapplicationbackgroundproceduresassociatedCash/Checkpredefined&80000005&displayingAutoRedrawbreakpointhorizontalConversionFahrenheitForeColor:BreakpointPropertiesControlBox''CreatingrecognizesPopulationOLE Clientminute....propertiesavailableForm1.frmLoanSheettutorial.determineinterfaceImmediatereinstallrectanglemanipulatincorrectcmdCanceldifferentdebugginggraphicalProcedureintroducestatementMicrosoftmetafile.displayeddiscussed0 - Soliddrop-downcontinue.the form.ngle StepfollowingquestionsAdding coBackColorSeparatora commandFile menuDrawWidthCombo BoxprocedureStatementYou can cExpected:DrawStyleGraphicsHEX7782AresponsevariableText BoxMaterialExplicitList BoxdirectortemplatetutorialdisplaysverticalGotFocusproblemspropertypressingtxtSalesLearningselectedcontrolstemporarstandardKeyPresscreatingexistingItem No.SPACEBARTo put acontrolssupportsOptions.PropertyTutorialexample,control.in code.indicategraphicsbackwardtoolbar.checkingchoosingWatch...languageControlsan errorcontinueContinue16776960additionfunctioncontentsDiameterDrawModemistypedprogramSummaryprojectYou canA framemistakeproductSizablename.''window.providequicklyreadingProjectProgramProductthroughPointermessageWorkingpictureWindowsPaymentalls...lessonswhetherTo makeanotherOptionslesson.lesson,appearsrelatedCountryrespondToolboxEnabledresultsCaptionEnd SubsimilarroundedVisibletxtCelsrunningCatalogpaymentCelsiuspaletteinitialbetweenChaptersectionoperatisettingincludein yourIntegeroutput.sessionseparattriggerbutton.buttonsexampleidentifexampledisplaycaptiondiagramdefaultcurrentcorrectcontrolchkBoldcontainconsistgraphicworking''Entercommandforwardclientactiveactionaddingaccessacceptcolorscolumncombina menuanswercommonA formaroundchooseALT+O.WindowVisual0.375"UnlikeAs youBasic.To addconverattachSwedenSinglecreateSelectchargecursorcustomScrollBronzeButtonOptionchangedefineOptiondescridesigndetectObjectbeforedialogNow, wNoticeMsgBoxbitmapModuleCapitaLengthbuttonChargeIncomeClientbuttonGuide.End IfDesign$2,400easiereasilyupdatesystemeffecteithersyntaxmethoduniquelogic.errorsloadedeventsswitchstringyou'veexecutsquaresimplemoduleexpectneedednumberselectletterselectobjectscrolllessonfollowvisualyou'reon theoptionright.insideountryforms.reviewfound.indentreturnpositiyou'llrequirin thepressepromptwindowwithinhandleto theremainwritecan'tguidegroupAftercauseimagecheckclickbreakboxesclickframeformswhilebeinginputform.whichcode.arrowarraywe'llcolorwatchcombolabelBasiclargelearnfocusappeavalueusingfilesfieldcouldcoverexit,eventlocaterrordriveenterallowENTEREdit,usersDebugmenu,menu.menusthe NaboutEntermighttheiruntilEventEveryFalsethesemousestep.startWorldnamesForm1Here,showstypesshownshapeWe'llthreeIn thoccurWatchLabelChecktime.LakestitleUsingMenu,otherMenu.ClickMenusCreatOrderreferProc:placepointSalesCountSolidpressStarttoolsTheseThereColorClickCloseThenTextbuilStepcallTheyThisbox.SaveTo cRGB(To dPAGEhelpTruepartOpenhavegivepaneNextNamefromUnitbox,codeformbackMenuViewListrunssamesaveLinefindopenonlyfileitemcompIndealsolikeIn aWhenshownextlineWithexitsingsizeFormdataneednameFormstepmovedonesuchmoredraweachebugFilelistExitWritmadetextthatYourmakeElsemanymenumenuEacheasyyourwritworkthemthenwiththeythisDOWNwillCut.timeBackwhento cto rwhatBarstoolwantCallCopyuserCodeusedundeCelstxtUseoneThenewtwoYouYouadduseTheTheallandanySubBoxarekeySetitswayredit.No.runseebarboxilesetcan255Forhowthe( )hastheyougetforditthe