csa computer4 lesson5b

50 %
50 %
Information about csa computer4 lesson5b

Published on August 12, 2008

Author: sdreyes102877

Source: authorstream.com

Slide 1: COMPUTER IV 8/12/2008 8:25:34 AM 08/11/08 { NCAE REVIEW } 08/11/08 { LECTURE /DEMO ON LESSON 5 /MENUS/B. Popup Menu & Common Dialog } PLEASE BE GUIDED… O8/11/08 -NCAE REVIEW given by the replacement teacher as seatwork. In Addition, you are told to submit your “behind the schedule” GROUP PROJECT [Hard and Soft copies – Unit 50 Lab. A]. O8/12/08-Scheduled Lesson Submission of TEXTBOOK for signing and NOTEBOOK for checking.  Common Dialog & Popup Menu : Common Dialog & Popup Menu Lesson 5 – MENUS [B] COMPUTER IV 8/12/2008 8:25:34 AM Objectives: Submit subject requirements on time. Add VB new controls/strategies in the group’s Note Editor Program. Follow submissively the given initial guidelines and procedures in creating a correct program  Test and debug programs prior to checking. Pages 51-54 {Required CAL - AP 3 TextBook} COMMON DIALOG : COMMON DIALOG 8/12/2008 8:25:34 AM Prepared by: sdr 3 What the Common Dialog Box Does? The Common Dialog Box control is possibly the most powerful control available because of its capability to become one of several common dialog boxes you've surely seen in Windows applications. The common dialog box goes far beyond the combo box's capability to take on different looks and purposes. When you place a common dialog box on a form, you won't be able to resize it because the control, like the Timer control, will not appear on the form at runtime, at least not right away. Your runtime code will have to display the common dialog box, and the look of the common dialog box displayed depends on what your code needs at the time. Slide 4: 8/12/2008 4 Sample Programs: Exercise #3 - page 54 / Group Project Figure 1: OPEN Dialog Box : Figure 1: OPEN Dialog Box Prepared by: sdr 5 8/12/2008 8:25:34 AM Using the common File Open dialog box to request a filename and location. Figure 2: SAVE Dialog Box : Figure 2: SAVE Dialog Box Prepared by: sdr 6 8/12/2008 8:25:34 AM The File Save dialog box is also familiar to Windows users. Figure 3: COLOR Dialog Box : Figure 3: COLOR Dialog Box Prepared by: sdr 7 8/12/2008 8:25:34 AM The Color dialog box is used by the user to pick a color. Figure 4: FONT Dialog Box : Figure 4: FONT Dialog Box Prepared by: sdr 8 8/12/2008 8:25:34 AM The Font dialog box shows font information from the user's system. Figure 5: PRINT Dialog Box : Figure 5: PRINT Dialog Box Prepared by: sdr 9 8/12/2008 8:25:34 AM The Print dialog box lets the user select a printer for output. Adding the Common Dialog Box Control : Adding the Common Dialog Box Control 8/12/2008 8:25:34 AM Prepared by: sdr 10 Although the Common Dialog Box control is known as a standard control, the control doesn't appear on your toolbox until you add it. Perform these steps to add the Common Dialog Box control to your toolbox: Slide 11: 8/12/2008 11 Select Project | Components (Ctrl+T is the equivalent shortcut key for this option) to display the Components dialog box. Scroll to the control named Microsoft Common Dialog Control 6.0 and select it. Click OK. The Common Dialog Box control will now appear at the end of your Toolbox window. Double-click the Common Dialog Box control to add the control to your Form window. Slide 12: 8/12/2008 12 Slide 13: 8/12/2008 13 When you add the Common Dialog Box control, you'll see several other controls listed in the Components dialog box. At any time you can add these other controls to your tool box if you think you can use their help. For example, you can add the Microsoft Calendar control if you need to display calendar information in a Visual Basic application. You can add any ActiveX control to your toolbox, and Visual Basic comes with several that you see when you display the Components dialog box. Generating Common Dialog Boxes : Generating Common Dialog Boxes 8/12/2008 14 When you add a Common Dialog Box control to your toolbox and then double-click the control to add a dialog box to your Form window, Visual Basic offers an extra Properties window property, Custom, that can be used to set multiple properties. Special Property Pages dialog box is reached by right-clicking the Common Dialog Box icon and selecting Properties. Slide 15: 8/12/2008 15 Figure shows the tabbed Property Pages dialog box that appears when you click the Custom property. You'll see tabs across the top that display properties sheets for Open/Save As, Color, Font, Print, and Help dialog boxes. The properties sheets don't offer all properties, but they do simplify entering the most common properties for each kind of dialog box. The Common Dialog Box Methods : The Common Dialog Box Methods 8/12/2008 16 To display a particular dialog box, your application must specify one of these methods: ShowColor ShowFont ShowHelp ShowOpen ShowPrinter ShowSave CODES ARE LOCATED IN YOUR TEXTBOOK POP - UP MENU : POP - UP MENU 8/12/2008 8:25:34 AM Prepared by: sdr 17 A Pop – up Menu is created in the Menu Editor as well. However, VISIBLE property must be “unchecked” making the menu invisible. A mouse click event will trigger the menu to appear on the screen/form. Sample Program: Exercise #2 - page 52 : Sample Program: Exercise #2 - page 52 8/12/2008 18 GROUP WORK : GROUP WORK ACTIVITY 5BCreate the Sample Program: Exercise #2 - page 52 [ pop – up menu ] Filename: SECTION_G#_ACT5B_POPUP Use your group’s flash drive in saving your file[s], create a new folder for this activity….

Add a comment

Related presentations