INSTRUCTIONS FOR CREATING THE NOTES FORM

We are now ready to construct the FRMNOTES.FRM form. DEMONSTRATE THE FORM AGAIN This form has 7 objects with the following properties: OBJECT PROPERTY VALUE 1.Form Caption Customer Note Name FrmNotes WindowState Maximized 2. Label Caption Venus Motors Autosize True Fontsize 18 3. Label Caption 801 Wood DriveCheyenne WY 80123 FontItalic True Autosize True Fontsize 10 4. Textbox Name TxtSalutation FontSize 12 Text Put in blanks Border None 5. Textbox Name TxtNote FontSize 12 Multiline True Text Put in blanks Border None 6. Textbox Name TxtCustomer FontSize 12 Text Put in blanks Border None Multiline True 7. Textbox Name TxtDate FontSize 12 Border None Text Put in blanks We must also specify the menu options through the Menu Design Window (5th icon on the tool bar) CAPTION (As it appears to users) NAME File MnuFile Print MnuFilePrint Exit MnuFileExit Notes MnuNotes Purchase MnuNotesPurch Visit MnuNotesVisit Using the “arrow” key: File ---Print ---Exit Notes ---Purchase ---Visit Now we must do the programming code. What do we want to happen as the user goes through the menu options? If the user selects EXIT we want: 1. To returm to the customer form and set all the variable values back to blanks or the defaults: Frmcust.TxtName.Text = “” Frmcust.TxtAddr.Text = “” Frmcust.TxtCity.Text = “” Frmcust.TxtState.Text = “WY” Frmcust.TxtZip.Text = “” 2. We also want to set the TxtNote.Txt back to blanks: TxtNote.Text = “” 3. We want to show the customer form: Frmcust. show 4. We want to put the cursor at the TxtName box: Frmcust.TxtName.Setfocus If the user selects the PRINT option, we want to send the form to the printer. Printform If the user selects the PURCH option, we want to fill in the form with the purchase note: TxtDate.Text = DATE (this copies the system DOS date) TxtSalutation.Text = “Dear Customer:” Sent1 = “Thank you for purchasing a car from Venus Motors.” Sent2 = “We appreciate your business.” Sent3 = “This note is to verify that you are registered in the next weekly drawling for a free Venus car of your choice.” TxtNote.Text = Sent1 & Sent2 & Sent3 If the user selects the VISIT option, we want to fill in the form with the visit note: TxtDate.Text = DATE (this copies the system DOS date) TxtSalutation.Text = “Dear Customer:” Sent1 = “Thank you for visiting our showroom.” Sent2 = “This note is to verify that you are registered in the next weekly drawling for a free Venus car of your choice.” TxtNote.Text = Sent1 & Sent2 Finally, in order for your printform to work properly in some versions of Visual Basic, we might need to set the height and width of the form object in a load event. The unit of measure is called a twip. There are 1440 twips in one inch. Height = 15840 Width = 12240 Be sure to save as FRMNOTES.FRM