34,333
edits
Changes
→Programming Menu Items in Visual Basic
== Programming Menu Items in Visual Basic ==
We will begin by writing a Visual Basic event procedure for when the Exit menu option is selected. In Visual Studio click on the ''File'' menu so that the menu drops down and double click on the ''Exit'' menu option. Visual Studio will subsequently display the ''Click'' event procedure for this menu item. All we need to do is add a Close() call to this procedure to exit the application: