Visual Basic Concepts
Menu Design for ActiveX Documents
See Also
You can create your own menus for your ActiveX designer by using the Visual Basic Menu Editor. Containers that support ActiveX documents will also automatically merge any Help menu you create with the container's Help menu.
Tell Them Who You Are
When a user comes across your document — whether through a browser, binder, or other application — she may not immediately recognize it. For this reason, it is highly recommended that you always add an "About" menu to every ActiveX document you create.
You should also be aware that some containers will not display their menus correctly unless the ActiveX document merges a Help menu with the container's Help menu.
To merge an About box with the container's Help menu
- On the Project menu, click Add Form.
- In the Add Form dialog box, double-click the AboutBox with SysInfo icon to add an About Box form to the project.
- Set the Caption property of the form and Label controls appropriate to your ActiveX document.
- In the Project Explorer window, double-click your UserDocument to bring its designer forward.
- Click the UserDocument designer to select it, and on the Tools menu, click Menu Editor to display the menu editor dialog box.
- Click the Caption box and type &Help.
- Click the Name box and type mnuHelp.
- Click the NegotiatePosition box, and click Right.
- Click the Next button to create a new menu item.
- In the Caption box type "About" and the name of your ActiveX document.
- In the Name box type mnuAbout.
- Click the right-facing arrow button to indent the menu item.
- Click OK.
- Double-click your ActiveX designer to bring its Code window to the front.
- Add the following code to the mnuAbout Click event:
Private Sub mnuAbout_Click()
frmAbout.Show vbModal
End Sub