You are on page 1of 21

DEPARTMENT OF TECHNICAL EDUCATION

NDHRA PRADESH
Name of the faculty : G. Radha
Designation : Lecturer
Branch : CCP
Institute : 026 - SG Govt. Polytechnic, Adilabad
Year / Semester : III Year / V Semester
Subject : Visual Basic – I
Subject Code : CCP - 503
Topic : Understand Menus and Common
dialogue control .
Duration : 50 Mts.
Sub Topic : Designing Menu to third level.
Teaching Aids : Animations & Images

CCP-503.13 1
Recap

 Creation of Menus at design time using menu design


window, in detail

CCP-503.13 2
Objectives :

Upon the completion of this period, you will be


able to understand

 How to design Menus at run time up to third level

CCP-503.13 3
Details of Menu to be created - 1
 This program contains a menu bar with two titles Colors
and Size

 The Colors menu allows selection of a color from a menu


and fills the program’s Form with the selected color

 The colors menu has menu items FillColor and Exit

CCP-503.13 4
Details of Menu to be created - 2
 When the FillColor is clicked another menu appears
with a list of colors.

 This is a sub menu of the menu FillColor

 The Form is filled with selected color from the sub


menu

 The Size Menu contains Menu items Small and Large

CCP-503.13 5
Details of Menu to be created - 3

 First we have to create Menus & Submenus using


Menu Design Window

 Then we have to write code in Code Window to


control the menus at run time

CCP-503.13 6
Designing Menu

Follow these steps :-

 A new Standard Exe Project is opened and the Form,


and the Project files are saved as frmColor.frm and
Colors.VBP respectively

 The Form is designed as per the properties table given


below

CCP-503.13 7
Properties of form

Object Property Settings

Form Caption COLOR/SIZE

Form Name frmColor

CCP-503.13 8
Specifications of Menu to be created

Caption Name
&Colors MnuColors
…&FillColor MnuFillColor
……&Red MnuRed
……&Green MnuGreen
……&Blue MnuBlue
&Size MnuSize
…S&mall MnuSmall
…&Large MnuLarge

CCP-503.13 9
Designing Menu

Follow these steps :-


 After setting the Menu Editor, &Colors is typed in the
Caption Text Box and MnuColors in the Name Text Box

 The ‘&’ character underlines the letter C. This property


allows us to press ‘Alt+C’ while the program is running,
which has the same effect of clicking Colors in the Menu

CCP-503.13 10
Designing menu

 The Next button is clicked and &FillColor is typed in


the Caption Text Box and MnuFillColor in the Name
Text Box.

 The right arrow button is clicked now to make this as


lower level of Colors Item

• The Next button is clicked and &Exit is typed in the


Caption Text Box and MnuExit in the Name Text Box
CCP-503.13 11
Designing Menu

 The Next button is clicked and &Size is typed in the


Caption Text Box and MnuSize in the Name Text Box. The
left arrow button is clicked now to make this as the same
level with Colors Item

 Now the Next button is clicked and S&mall is typed in the


Caption Text Box and MnuSmall in the Name Text Box.
The right arrow is clicked to make this as the lower level to
Size Item

CCP-503.13 12
Designing Menu

• The Next button is clicked and &Large is typed in the


Caption Text Box and MnuLarge in the Name Text Box

• When Fill Color menu item is selected, a sub menu with


Red, Green and Blue should Popup. Hence, these
items should be included below the Fill Color item

CCP-503.13 13
Full Menu Editor after adding the Menu
Items to it

CCP-503.13 14
Run-time Menu to Third Level

CCP-503.13 15
Run-time Menu

CCP-503.13 16
Summary

 Designing Menu upto Third Level

CCP-503.13 17
Quiz

1. Which arrow mark is used to create sublevel menu item


while designing menus

A) Left Arrow
B) Right Arrow
C) Top Arrow
D) Bottom arrow

CCP-503.13 18
1. Which special character is used as prefix to Caption of the
Menu item to create a shortcut key?

A) &
B) &&
C) *
D) **

CCP-503.13 19
Frequently Asked Questions

 Explain the process of creating Menus upto third


Level

CCP-503.13 20
Assignment
 Create a Menu upto 4th level

CCP-503.13 21

You might also like