Context Menus

Context menus can be associated with controls on your form. These menus appear when the user right-clicks the control.

To add a context menu to a form

  1. Under the WFC Controls in the Toolbox, double-click the ContextMenu control.

Note   Use any of the methods to add a control to a form. You can also select the ContextMenu control in the Toolbox and drag the control onto your form.

  1. To enter design mode, double-click the ContextMenu control.

To assign a context menu to a control

  1. Click the control you want to assign a context menu to.

  2. In the Properties window, add the name of the context menu to the contextMenu property. By default, the first context menu is named contextMenu1.

Context menu controls can be edited in the same way as MainMenu controls. For more information, see Adding and Modifying a Menu.