Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

COMPUTER 10

NAME: ______________________________________________________ DATE: ______________


4Q WEEK 1-2

Topic: CREATING MENUS AND TOOLBARS

Objectives:
At the end of the day, I will be able to:
a. create menus;
b. create toolbars; and
c. include menus in their projects.

Discussion:
Creating Menus and Toolbars

A. Creating Menus
 The Menu Editor helps you to make menus for your applications. In a way, it acts
like the Properties Window for the Menu bar because it allows you to set the names
of the menu controls, the captions that the users will see on the menus, and other
related information.
 The menus you make will look like the menus of any Microsoft program that you
have used. They are very convenient to use that even those products not made by
Microsoft now also have menus.
 Menus are associated with forms. Each form can have its own set of menus. They
may be identical or different.
 To go to the Menu Editor, simply click its icon in the toolbar or press Ctrl-E.
How to Set the Events for Each Menu Item
1. Click on the menu.
2. Double-click a sub-menu or menu item.
3. Type the syntax or code for the menu item. For opening common dialog boxes, the
common Dialog Box control should be inserted into the Toolbox.
How to Open the Common Dialog Control
1. Right-click on a space in the Toolbox.
2. Click Components.
3. Check Microsoft Common Dialog Control 6.0.

4. Click OK.
5. Draw a Common Dialog Control icon in your form.

B. Creating Toolbars
1. Right-click on the Toolbox.
2. Click Components.
3. Check Microsoft Windows Common
Controls 6.0 (SP3).
4. Click OK.
5. Draw the Toolbar icon in your form.
6. Draw an Image List Control icon in your form.
7. Right-click the Toolbar in your form and
then click Properties.
Draw an Image List Control icon in your form.

8. The Property Pages window of the Toolbar will appear. Click the Buttons tab.

9. Click the Insert button according to the number of toolbars that you want to insert. See
the numbers opposite to the button.
10. Draw the Image List icon in your form.
Right-click the icon and then click Properties.
11. The Property Pages window will appear again. Click the Images tab.

a. Click the Insert Picture button. Select picture files from the Select Picture dialog box for
the buttons of your toolbar. Observe that the index value above will change as pictures
are inserted. Each picture will have an index value.
b. Click on the General tab. Select a size for your button.
c. Click OK.
d. Open the Property Pages window for your toolbar. Do Step 9 again.
e. In the General tab, click the down-arrow for Image List. Select the name of the Image
List control you created.

f. Click the Buttons tab. Set the same values for Index and Image.
g. Observe as the buttons carry the images. Click OK.
h. Create the codes for the buttons of the toolbar.

Prepared by:
Ms. Danilyn S. Carmona
COMPUTER 10
NAME: ______________________________________________________ DATE: ______________
4Q WEEK 1-2

Topic: CREATING MENUS AND TOOLBARS

DIRECTION: PLEASE REFER TO THE INTERNET TO FIND ALL THE ANSWERS.

Comprehension:
Direction: Answer the following questions. Write your answers in two sentences only
in a space provided below. 3 points each.
How can we link a database to Visual Basic?
______________________________________________________________________
______________________________________________________________________

Exercises:
Direction: Encircle the correct answer. 1 point each.
1. The Visual Basic Code Editor will automatically detect certain types of errors as
you are entering code.
A. True B. False
2. Keywords are also referred to as reserved words.
A. True B. False
3. The divide-and-conquer-method of problem solving breaks a problem into large,
general pieces first, then refines each piece until the problem is manageable.
A. True B. False
4. Visual Basic responds to events using which of the following?
A. a code procedure
B. an event procedure
C. a form procedure
D. a property
5. When the user clicks a button, _________ is triggered.
A. an event
B. a method
C. a setting
D. a property
6. What property of controls tells the order they receive the focus when the tab key is
pressed during run time?
A. Focus order
B. Focus number
C. Tab index
D. Control order
7. Sizing Handles make it very easy to resize virtually any control when developing
applications with Visual Basic. When working in the Form Designer, how are these
sizing handles displayed?
A. A rectangle with 4 arrows, one in each corner, around your control.
B. A 3-D outline around your control.
C. A rectangle with small squares around your control.
D. None of the above.
8. The Properties window plays an important role in the development of Visual Basic
applications. It is mainly used ______________________
A. to change how objects look and feel.
B. when opening programs stored on a hard drive.
C. to allow the developer to graphically design program components.
D. to set program related options like Program Name, Program Location, etc.
9. When creating a new application in Visual Basic, you are asked to supply a name
for the program. If you do not specify a name, a default name is XXXXX XXXXX is
this default name?
A. Wapplication followed by a number.
B. Application followed by a number.
C. WindowsApplication.
D. WindowsApplication followed by a number.
10. Which of the properties in a control’s list of properties is used to give the control
a meaningful name?
A. Text
B. ContextMenu
C. ControlName
D. Name

Thought of the Day/ Reflection:

“Most of your times your computer is not responding as you expected –


first try to find out if the “ERROR” is not sitting right next to the
computer. – Thomas Baehr

References/Sources/Websites:
I.T Programming Book, Laura M. Cruz p. 175-193

Prepared by:
Mr. Fidel T. Sardonidos Jr.

You might also like