SlideShare a Scribd company logo
1 of 20
VB.NET FORM
TOOL/COMPONENT
MENUSTRIP
Presentation Developed
By:
Kavankumar N. Solanki
MENUSTRI
P
18.
In Visual Basic, the MenuStrip Control represents the container
for the menu structure of a form; you can assign a control of this
type of form’s Menu property at run time.
Menus are made up of MenuItem objects that represent the
individual part of menu(MenuItems can be parent menu or menu
Item in menu).
Slide 7- 3
INTRODUCTION OF TOPIC
•MenuStrip
•What is Menu?
• Creating a menu system
• Use functions of Menu by commands
and submenus that the user may
select from Menu Item.
COMPONENTS OF A MENU
SYSTEM
• Each drop-down menu has a menu name
• Each drop-down menu has a list of actions or menu
commands that can be performed
• Some commands may lead to a submenu Slide
7- 4
COMPONENTS OF A MENU
SYSTEM
• Actions may be performed using a key or key combination
called a shortcut key
• A checked menu command toggles between the
checked (if on) and unchecked (if off) states
• A separator bar helps group similar commands
Slide
7- 5
MENUSTRIP CONTROL
• A MenuStrip control adds a menu to a form
• Double-click on the MenuStrip icon in the Menus & Toolbars
section of the Toolbox
• The MenuStrip control is displayed in the component
tray (bottom of Design window)
• A MenuStrip can have many ToolStripMenuItem objects:
• Each represents a single menu command
• Name property - used by VB to identify it
• Text property – text displayed to the user
Slide
7- 6
TOOLSTRIPMENUITEM OBJECT
NAMES• Should begin with mnu
• Then by convention are named based on their text
property and position in the menu hierarchy
• mnuFile
• mnuFileSave
• mnuFilePrint
• mnuFileExit
Slide
7- 7
TOOLSTRIPMENUITEM TEXT
PROPERTIES
• The text property holds the menu item description that is
displayed to the user
• If an access key is assigned, that letter must be preceded with an
ampersand
Object Name Access Key Text Property
mnuFile F &File
mnuFileSave S &Save
mnuFilePrint P &Print
mnuFileExit X E&xit
Slide
7- 8
MENU DESIGNER
• The Menu Designer allows visual menu creation by
filling in boxes with the menu text:
Slide
7- 9
Enter last
command in
the File menu
Enter the
next menu
name
SHORTCUT KEYS
• Keyboard based shortcuts that execute menu commands
without using the menu system
• For example, ctrl-c to Copy to the clipboard
• These are set via the Shortcut property of each menu
item
• A shortcut is displayed to the user only if the
ShowShortcut property is set to true
Slide
7- 10
CHECKED MENU ITEMS
• Some menu items just turn a feature on or off
• For example, an alarm for a clock
• To create a checked menu item:
• Set CheckOnClick property to true
• Set Checked property to True if feature should be on
when the form is initially displayed
• Can test a checked menu item in code
If mnuSettingsAlarm.Checked = True Then
MessageBox.Show(“Wake UP!”)
End If Slide
7- 11
DISABLED MENU ITEMS
• A menu item is grayed out (disabled) with the
Enabled property
• Paste option is initially disabled and only enabled
after something is cut or copied
• Code initially disables the Paste option
• Following a cut or copy, Paste is enabled
Slide
7- 12
mnuEditPaste.Enabled = True
mnuEditPaste.Enabled = False
ADDING SEPARATOR BARS
• Right-click menu item, select Insert Separator
• Separator inserted above the menu item
• Or create a menu item with one hyphen (-) as the text
property
Slide
7- 13
SUBMENUS
• When selecting a menu item in the designer, a Type Here
box appears to the right
• Begin a submenu by setting up this menu item
• If a menu item has a submenu, a solid right-pointing arrow
will be shown for this item
Slide
7- 14
Enter the
sub menu
name
INSERTING, DELETING, &
REARRANGING
• To insert a new menu item within the list
• Right-click the item to follow the new one
• Select Insert then MenuItem from pop-up menu
• Use Menu Designer to add new menu items at the end by
entering the text to appear
• To remove a menu item
• Right-click on the item
• Choose Delete from the pop-up menu
• The Menu Designer can rearrange items using a click and
drag approach
Slide
7- 15
TOOLSTRIPMENUITEM CLICK
EVENTS• Menus and submenus require no code
• Commands must have a click event procedure
• Double click on the menu item
• Event procedure created in the code window
• Programmer supplies the code to execute
• Double click the menu item object mnuFileExit, then add a
Me.Close command as shown below
Slide
7- 16
Private Sub mnuFileExit_Click(ByVal sender as System.Object, _
ByVal e as System.EventArgs) Handles mnuFileExit.Click
Me.Close()
End Sub
Programmer supplied code
Click event procedure created by VB
STANDARD MENU ITEMS
• In general follow the conventions that most application
menu systems use
• File is leftmost item with access key Alt-F
• File item has Exit command, access key Alt-X
• Help is the rightmost item
• Help menu has an About command
Slide
7- 17
PRACTICAL EXAMPLE:-
Open Visual Studio by Clicking
Here.
Menu stripe
Menu stripe

More Related Content

What's hot

What's hot (20)

Java Beans
Java BeansJava Beans
Java Beans
 
Validation Controls in asp.net
Validation Controls in asp.netValidation Controls in asp.net
Validation Controls in asp.net
 
Android ui menu
Android ui menuAndroid ui menu
Android ui menu
 
Vb.net ide
Vb.net ideVb.net ide
Vb.net ide
 
Windows form application_in_vb(vb.net --3 year)
Windows form application_in_vb(vb.net --3 year)Windows form application_in_vb(vb.net --3 year)
Windows form application_in_vb(vb.net --3 year)
 
Ado.Net Tutorial
Ado.Net TutorialAdo.Net Tutorial
Ado.Net Tutorial
 
Java database connectivity with MySql
Java database connectivity with MySqlJava database connectivity with MySql
Java database connectivity with MySql
 
JDBC
JDBCJDBC
JDBC
 
Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)
 
ASP.NET Web form
ASP.NET Web formASP.NET Web form
ASP.NET Web form
 
Properties and indexers in C#
Properties and indexers in C#Properties and indexers in C#
Properties and indexers in C#
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Servlets
ServletsServlets
Servlets
 
Windowforms controls c#
Windowforms controls c#Windowforms controls c#
Windowforms controls c#
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
 
Java swing
Java swingJava swing
Java swing
 
Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface)
 
Java swing
Java swingJava swing
Java swing
 
Java layoutmanager
Java layoutmanagerJava layoutmanager
Java layoutmanager
 
Installing JDK and first java program
Installing JDK and first java programInstalling JDK and first java program
Installing JDK and first java program
 

Similar to Menu stripe

Module-5-screen based control.ppt
Module-5-screen based control.pptModule-5-screen based control.ppt
Module-5-screen based control.pptSuneelShinde4
 
Module-5-screen based control (1).ppt
Module-5-screen based control (1).pptModule-5-screen based control (1).ppt
Module-5-screen based control (1).pptSuneelShinde4
 
Oracle Forms: Menu
Oracle Forms: MenuOracle Forms: Menu
Oracle Forms: MenuSekhar Byna
 
Visual Basic menu
Visual Basic menuVisual Basic menu
Visual Basic menukuldeep94
 
1 PROBLEM You are to design and implement a Menu class.docx
1 PROBLEM You are to design and implement a Menu class.docx1 PROBLEM You are to design and implement a Menu class.docx
1 PROBLEM You are to design and implement a Menu class.docxhoney725342
 
System Menu And Navigation
System Menu And NavigationSystem Menu And Navigation
System Menu And NavigationOvidiu Von M
 
Introduction to UiAutomation EMEA APAC.pdf
Introduction to UiAutomation EMEA APAC.pdfIntroduction to UiAutomation EMEA APAC.pdf
Introduction to UiAutomation EMEA APAC.pdfCristina Vidu
 
Autodesk maya 2016 basic guide
Autodesk maya 2016 basic guideAutodesk maya 2016 basic guide
Autodesk maya 2016 basic guideĐỗ Hải
 
Actions and menus in odoo 16
Actions and menus in odoo 16Actions and menus in odoo 16
Actions and menus in odoo 16Celine George
 
Temp.dll
Temp.dllTemp.dll
Temp.dllJet Li
 
Temp.dll
Temp.dllTemp.dll
Temp.dllJet Li
 

Similar to Menu stripe (20)

Intake 37 8
Intake 37 8Intake 37 8
Intake 37 8
 
Intake 38 8
Intake 38 8Intake 38 8
Intake 38 8
 
Module-5-screen based control.ppt
Module-5-screen based control.pptModule-5-screen based control.ppt
Module-5-screen based control.ppt
 
Module-5-screen based control (1).ppt
Module-5-screen based control (1).pptModule-5-screen based control (1).ppt
Module-5-screen based control (1).ppt
 
Oracle Forms: Menu
Oracle Forms: MenuOracle Forms: Menu
Oracle Forms: Menu
 
android menus
android menusandroid menus
android menus
 
Visual Basic menu
Visual Basic menuVisual Basic menu
Visual Basic menu
 
Gui
GuiGui
Gui
 
lec 9.pptx
lec 9.pptxlec 9.pptx
lec 9.pptx
 
1 PROBLEM You are to design and implement a Menu class.docx
1 PROBLEM You are to design and implement a Menu class.docx1 PROBLEM You are to design and implement a Menu class.docx
1 PROBLEM You are to design and implement a Menu class.docx
 
GUI -THESIS123
GUI -THESIS123GUI -THESIS123
GUI -THESIS123
 
System Menu And Navigation
System Menu And NavigationSystem Menu And Navigation
System Menu And Navigation
 
Introduction to UiAutomation EMEA APAC.pdf
Introduction to UiAutomation EMEA APAC.pdfIntroduction to UiAutomation EMEA APAC.pdf
Introduction to UiAutomation EMEA APAC.pdf
 
tL19 awt
tL19 awttL19 awt
tL19 awt
 
Autodesk maya 2016 basic guide
Autodesk maya 2016 basic guideAutodesk maya 2016 basic guide
Autodesk maya 2016 basic guide
 
Actions and menus in odoo 16
Actions and menus in odoo 16Actions and menus in odoo 16
Actions and menus in odoo 16
 
03_GUI.ppt
03_GUI.ppt03_GUI.ppt
03_GUI.ppt
 
Module iii part i
Module iii part iModule iii part i
Module iii part i
 
Temp.dll
Temp.dllTemp.dll
Temp.dll
 
Temp.dll
Temp.dllTemp.dll
Temp.dll
 

More from Conestoga Collage

More from Conestoga Collage (13)

Networking and Security in Java
Networking and Security in JavaNetworking and Security in Java
Networking and Security in Java
 
Ps02 eint21 electronic data interchange
Ps02 eint21 electronic data interchangePs02 eint21 electronic data interchange
Ps02 eint21 electronic data interchange
 
Ps02 cint21 enterprise information system
Ps02 cint21 enterprise information systemPs02 cint21 enterprise information system
Ps02 cint21 enterprise information system
 
Ps02 cint23 ado
Ps02 cint23 adoPs02 cint23 ado
Ps02 cint23 ado
 
Ps02 cint24 mvc in php
Ps02 cint24 mvc in phpPs02 cint24 mvc in php
Ps02 cint24 mvc in php
 
PS02CINT22 SE Software Maintenance
PS02CINT22 SE Software MaintenancePS02CINT22 SE Software Maintenance
PS02CINT22 SE Software Maintenance
 
Operating systems & its future
Operating systems & its futureOperating systems & its future
Operating systems & its future
 
Bluetooth
BluetoothBluetooth
Bluetooth
 
Blue Brain project
Blue Brain projectBlue Brain project
Blue Brain project
 
AI programming languages
AI programming languagesAI programming languages
AI programming languages
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Web Based Claim Processing System
Web Based Claim Processing SystemWeb Based Claim Processing System
Web Based Claim Processing System
 
Blue Brain Project
Blue Brain ProjectBlue Brain Project
Blue Brain Project
 

Recently uploaded

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 

Recently uploaded (20)

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 

Menu stripe

  • 2. MENUSTRI P 18. In Visual Basic, the MenuStrip Control represents the container for the menu structure of a form; you can assign a control of this type of form’s Menu property at run time. Menus are made up of MenuItem objects that represent the individual part of menu(MenuItems can be parent menu or menu Item in menu).
  • 3. Slide 7- 3 INTRODUCTION OF TOPIC •MenuStrip •What is Menu? • Creating a menu system • Use functions of Menu by commands and submenus that the user may select from Menu Item.
  • 4. COMPONENTS OF A MENU SYSTEM • Each drop-down menu has a menu name • Each drop-down menu has a list of actions or menu commands that can be performed • Some commands may lead to a submenu Slide 7- 4
  • 5. COMPONENTS OF A MENU SYSTEM • Actions may be performed using a key or key combination called a shortcut key • A checked menu command toggles between the checked (if on) and unchecked (if off) states • A separator bar helps group similar commands Slide 7- 5
  • 6. MENUSTRIP CONTROL • A MenuStrip control adds a menu to a form • Double-click on the MenuStrip icon in the Menus & Toolbars section of the Toolbox • The MenuStrip control is displayed in the component tray (bottom of Design window) • A MenuStrip can have many ToolStripMenuItem objects: • Each represents a single menu command • Name property - used by VB to identify it • Text property – text displayed to the user Slide 7- 6
  • 7. TOOLSTRIPMENUITEM OBJECT NAMES• Should begin with mnu • Then by convention are named based on their text property and position in the menu hierarchy • mnuFile • mnuFileSave • mnuFilePrint • mnuFileExit Slide 7- 7
  • 8. TOOLSTRIPMENUITEM TEXT PROPERTIES • The text property holds the menu item description that is displayed to the user • If an access key is assigned, that letter must be preceded with an ampersand Object Name Access Key Text Property mnuFile F &File mnuFileSave S &Save mnuFilePrint P &Print mnuFileExit X E&xit Slide 7- 8
  • 9. MENU DESIGNER • The Menu Designer allows visual menu creation by filling in boxes with the menu text: Slide 7- 9 Enter last command in the File menu Enter the next menu name
  • 10. SHORTCUT KEYS • Keyboard based shortcuts that execute menu commands without using the menu system • For example, ctrl-c to Copy to the clipboard • These are set via the Shortcut property of each menu item • A shortcut is displayed to the user only if the ShowShortcut property is set to true Slide 7- 10
  • 11. CHECKED MENU ITEMS • Some menu items just turn a feature on or off • For example, an alarm for a clock • To create a checked menu item: • Set CheckOnClick property to true • Set Checked property to True if feature should be on when the form is initially displayed • Can test a checked menu item in code If mnuSettingsAlarm.Checked = True Then MessageBox.Show(“Wake UP!”) End If Slide 7- 11
  • 12. DISABLED MENU ITEMS • A menu item is grayed out (disabled) with the Enabled property • Paste option is initially disabled and only enabled after something is cut or copied • Code initially disables the Paste option • Following a cut or copy, Paste is enabled Slide 7- 12 mnuEditPaste.Enabled = True mnuEditPaste.Enabled = False
  • 13. ADDING SEPARATOR BARS • Right-click menu item, select Insert Separator • Separator inserted above the menu item • Or create a menu item with one hyphen (-) as the text property Slide 7- 13
  • 14. SUBMENUS • When selecting a menu item in the designer, a Type Here box appears to the right • Begin a submenu by setting up this menu item • If a menu item has a submenu, a solid right-pointing arrow will be shown for this item Slide 7- 14 Enter the sub menu name
  • 15. INSERTING, DELETING, & REARRANGING • To insert a new menu item within the list • Right-click the item to follow the new one • Select Insert then MenuItem from pop-up menu • Use Menu Designer to add new menu items at the end by entering the text to appear • To remove a menu item • Right-click on the item • Choose Delete from the pop-up menu • The Menu Designer can rearrange items using a click and drag approach Slide 7- 15
  • 16. TOOLSTRIPMENUITEM CLICK EVENTS• Menus and submenus require no code • Commands must have a click event procedure • Double click on the menu item • Event procedure created in the code window • Programmer supplies the code to execute • Double click the menu item object mnuFileExit, then add a Me.Close command as shown below Slide 7- 16 Private Sub mnuFileExit_Click(ByVal sender as System.Object, _ ByVal e as System.EventArgs) Handles mnuFileExit.Click Me.Close() End Sub Programmer supplied code Click event procedure created by VB
  • 17. STANDARD MENU ITEMS • In general follow the conventions that most application menu systems use • File is leftmost item with access key Alt-F • File item has Exit command, access key Alt-X • Help is the rightmost item • Help menu has an About command Slide 7- 17
  • 18. PRACTICAL EXAMPLE:- Open Visual Studio by Clicking Here.