You can include controls for Windows application menu items in OpenSpan Window Container projects. Menus are not interrogated directly instead you will use the Add Menu Items function available from the Windows tab or Object Explorer when the application is being interrogated
1. Open the Interrogation tab and click Start Interrogation.
2. In the Object Explorer, right-click the form containing the menu you want to add and select Add Menu Items from the context menu.
3.The Add Menu Items dialog opens listing a check box for each target application menu bar option.Select the check boxes (i.e., check blank check boxes) for the menu options you want to add and use in your project.
4. Clear the checkboxes for the menu options you want to remove from your project. As you check and clear menu option check boxes the Object Explorer updates dynamically by adding and removing menu options.
Adding Context Menu Items
Context menu items are actions displayed to the user when he/she right-clicks on something. Alternatively referred to as local, shortcut or right-click menu items, they can be interrogated and included in OpenSpan projects:
1. Start Interrogation of the target application.
2. Interrogate the target application control/object (e.g., list box, data grid) associated with the context menu you want to include in your project.
3. Without stopping interrogation of the target application, change focus to the OpenSpan Object Explorer.
4. In the Object Explorer, right-click the target application window object and select Add Context Menu Items from the Context menu, or, from the Windows tab, highlight the target, right-click and select Add Context Menu Items.
5. Change focus back to the target application, and right-click or otherwise cause the context menu to show in the target application.
6. Instead of the context menu opening the Add Context Menu Items dialog opens. The only control in the dialog is a list box that defaults blank and will populate when you right-click in the target application when the Add Context Menu Items dialog is open.
7. Select the check boxes for the context menu items you want to include in your solution and then close the dialog box to save your selections.
8. The selected context menu items now appear in the Object Explorer and the associated properties can be used in your project.
9. Stop interrogation.
10. Click the menu options you want. Menu controls for each selected are added to the Object Explorer and appear as matched while the application is open and interrogator active.
11. The Menu Item Path match rule is used to match the Menu controls. The rule identifies the full path for selecting the item. For example, using the Help - About Calculator Menu Item, the Path displays in the Selected Match Rule Property Grid as: Help/About Calculator.
Note: As with all matched controls, context menu items will show as matched in the OpenSpan Object Explorer window. However, the associated match rules will not show as matched (i.e., leading green check mark) on the Matched Rules tab because the target context menu must be active when the match rules are refreshed, which is not possible. That is, an active context menu in the target application will not remain open when you change focus to the Interrogation tab to refresh match rules, as the focus change closes the context menu.
To add menu items from the Windows tab:
1. Click the Windows tab in the Designer window so that it is on top and visible.
2. Interrogate an application.
3. Right-click the form containing the Menu you want to add and then select Add Menu Items.
4. Continue by using the steps listed above for the Object Explorer.