Accusoft.ImagXpress13.ActiveX
Set the Context & Toolbar Menus

Enable Menus

ImagXpress® provides the capability to define one context menu, as well as a toolbar menu for each tool on the toolbar. Menus can be enabled or disabled using the MenuSetEnabled and MenuGetEnabled methods. When a menu is disabled, no menu will appear when the user right clicks on the element (if context menu) or tool (if toolbar menu).

VB Example
Copy Code
// This code demonstrates how to disable the toolbar and context menu
ImagXpress1.MenuSetEnabled Menu_Context, TOOL_None, False
ImagXpress1.MenuSetEnabled Menu_Toolbar, TOOL_None, False 

Modify Menu Items

To modify the items in a menu, use the "Menu" methods within the ImagXpress object.   

VB Example
Copy Code
// This code demonstrates how to add a new menu and sub-menu item to the context menu
ImagXpress.MenuAddItem Menu_Context, 0, 100, 0, "Rotate", 0, 0
ImagXpress.MenuAddItem Menu_Context, 0, 100, 1, "Rotate 90 degrees", 0, 0
ImagXpress.MenuAddItem Menu_Context, 0, 100, 2, "Rotate 180 degrees", 0, 0
Private Sub ImagXpress_MenuSelect( 
ByVal Menu As AccusoftImagXpress13Ctl.enumMenu,
ByVal Tool As AccusoftImagXpress13Ctl.enumIXTool,
ByVal TopMenuID As Long,
ByVal SubMenuID As Long,
ByVal User1 As Long,
ByVal User2 As Long) 
     If (menuType = MenuContext) Then
            Select Case TopMenuID
                Case 100
                        Select Case SubMenuID
                                   Case 1
                                       ImagXpress.Rotate 90
                                   Case 2
                                       ImagXpress.Rotate 180
                        End Select
             End Select
     End If
End Sub
See Also

 

 


©2015. Accusoft Corporation. All Rights Reserved.

Send Feedback