After your project is open, you need to set a reference to the ActiveX component that ships with eMbedded Visual Basic. To set the reference, choose Components from the Project menu. This presents you with a dialog box allowing you to choose components to add to your project (see Figure 4.1). You need to choose Microsoft Pocket PC MenuBar Control 3.0. If you plan to use menu buttons with images, also set a reference to Microsoft CE ImageList Control 3.0. Figure 4.1. In the ActiveX Components dialog box, select the desired components for your project: Microsoft Pocket PC MenuBar Control 3.0 and Microsoft CE ImageList Control 3.0. After setting reference to the components, your toolbar will contain two new controls. The ImageList and MenuBar controls are located at the bottom of Figure 4.2. Figure 4.2. The eVB toolbox with the standard controls, the MenuBar control, and the ImageList control. Next, add the menu control to your form. Values for Top, Left, Height and Width don't matter as the actual control will be invisible at runtime. Figure 4.3 shows a Menu control on an otherwise empty form. Figure 4.3. Once the MenuBar control is added to the form, it can be used to display menus , buttons, and button groups. |