GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / ClickMenu Event
Example





In This Topic
ClickMenu Event (GdViewer)
In This Topic
This event is raised when an item of the contextual menu has been clicked. The event occurs after the action specified by the clicked menu item has been executed.

Please check the corresponded GdViewer.ClickMenuEventHandler for given parameters.

Syntax
'Declaration
 
Public Event ClickMenu As GdViewer.ClickMenuEventHandler
public event GdViewer.ClickMenuEventHandler ClickMenu
public event ClickMenu: GdViewer.ClickMenuEventHandler; 
In JScript, you can handle the events defined by another class, but you cannot define your own.
public: __event GdViewer.ClickMenuEventHandler* ClickMenu
public:
event GdViewer.ClickMenuEventHandler^ ClickMenu
Example
How to add this event to your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated.
Friend WithEvents GdViewer1 As GdPicture14.GdViewer
            
'Add the event.
AddHandler GdViewer1.ClickMenu, AddressOf GdViewer1_ClickMenu
            
'Define the event.
Sub GdViewer1_ClickMenu(ByVal MenuItem As Integer) Handles GdViewer1.ClickMenu
    MessageBox.Show("The clicked menu item: " + MenuItem.ToString(), "GdViewer1.ClickMenu")
End Sub
//We assume that the GdViewer1 control has been properly integrated.
            
//Add the event.
GdViewer1.ClickMenu += GdViewer1_ClickMenu;
            
//Define the event.
void GdViewer1_ClickMenu(int MenuItem)
{
    MessageBox.Show("The clicked menu item: " + MenuItem.ToString(), "GdViewer1.ClickMenu");
}
See Also