Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

Make money selling software. Check this out here

Hosted clickbank mall. Check this out here




   Misc

   Amazon

   Links

    


Menu Editor
 

 

Menus are features that are available in nearly all programs nowadays . Making menus is very easy in Visual Basic using the menu editor .
To start the menu editor you go to Tools | Menu Editor or pressing Ctrl and e achieves the same results .
The menu editor now appears , here is what is displayed on screen.

Here is a run down of the important features

Caption : this is the name that the user will see 
Name : this is the name that the programmer uses , we use the mnu prefix for all menu items (mnuFile)
Shortcut : this assigns a shortcut to a menu item  this is a combination of keys which access a menu item for example Ctrl + c is commonly used for copy 
Checked : this allows the programmer to place a check beside a menu item , this is unchecked by default
Enabled : This specifies whether the menu item is accessible to the user , if this is checked the menu item is grayed out and inaccessible.
Visible: this determines whether the menu item is visible if this is not checked then the menu item will not appear at run time.
WindowList : determines whether the menu item applies to an MDI document (Word and Excel are examples of MDI applications)
HelpContextID : this matches a help description if you have any in your program
Index : this specifies a menus index in a control array.

You will also have noticed the arrows these are used to manipulate manu items the up and down arrows move the menu items up and down the list and the left / right arrows are used to indent the menu items.

Now we will create a simple menu .

  1. In the caption box type &File
  2. In the name box type mnuFile
  3. click on the next button the blue bar moves down ready for the next item to be entered
  4. Click the right arrow button
  5. In the caption type -
  6. In the Name box type mnuSeperator
  7. press the next button
  8. In the caption box type &Exit
  9. in the name box type mnuFileExit
  10. click on OK

Your menu editor should look like this at stage 10 

Ok now to add code to make the exit menu item function , open up the code window and locate the mnuFileExit click procedure and enter in it

Unload Me

Test and run your program , you have just created your first menu.

  

 

 

 

 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
Create a file(C Sharp)
factorial function(VB)
Server info(PHP)
Search and replace on a string(PHP)
Output a number with leading zeroes(PHP)
Disk drive information(VBScript)
Pause an app(VB)
Simple email sender(PHP)

    




Copyright © 2003 by programmershelp.co.uk