Kardi Teknomo
Kardi Teknomo Kardi Teknomo Kardi Teknomo
     
 
Research
Publications
Tutorials
Resume
Personal
Resources
Contact

 


Adding VB Menu

<Previous lesson | Table of Content | Content of this Chapter | Next lesson>

Click here to download the code

  1. Continue the MDI Form project, in the Project Window, double click the MDI Form1 to put the MDI Form in front
  2. In the Menu of VB, click Tools > Menu Editor or you can use Ctrl-E. The menu Editor will appear.
  3. In the Caption, type &File then in the name, type mnuFile then click Next button
  4. In the Caption, type &Exit then in the name, type mnuExit then click right arrow button. In the Shortcut list, choose Ctrl-X, then Next button
  5. In the Caption, type &Window then in the name, type mnuWindow then click the Window List checkbox, and then the Next button.
  6. In the Caption, type &Calendar then in the name, type mnuCalendar then click right arrow button. In the Shortcut list, choose Ctrl-L, then Next button
  7. In the Caption, type &Controller then in the name, type mnuController then click right arrow button. In the Shortcut list, choose F6, then Next button
  8. The menu editor will be the same as figure on the right. Press OK
  9. Now you have menu in the MDI Form, click File>Exit and enter
  10. In the mnuExit_Click procedure, type

Private Sub mnuExit_Click()

End
End Sub

  1. In the menu of MDI form, select Window > Controller and click to wrie the subsequent code


Private Sub mnuController_Click()

If mnuController.Checked = True Then
'now is checked, make it unchecked
frmController.Hide
mnuController.Checked = False
Else ' now is unchecked, make it checked
frmController.Show
mnuController.Checked = True
End If
End Sub

  1. Run the program, and look at the Window menu and try the Exit menu.


<Previous lesson | Table of Content | Content of this Chapter | Next lesson>

 
 
© 2006 Kardi Teknomo. All Rights Reserved.
Designed by CNV Media