Leadtools.Annotations Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
ShowContextMenu Method
See Also  Example
Leadtools.Annotations Namespace > AnnAutomation Class : ShowContextMenu Method




pos
A Point object that specifies the coordinates at which to display the menu. These coordinates are specified relative to the client coordinates of the Viewer.
Displays the automation context menu.

Syntax

Visual Basic (Declaration) 
Public Overridable Sub ShowContextMenu( _
   ByVal pos As Point _
) 
Visual Basic (Usage)Copy Code
Dim instance As AnnAutomation
Dim pos As Point
 
instance.ShowContextMenu(pos)
C# 
public virtual void ShowContextMenu( 
   Point pos
)
Managed Extensions for C++ 
public: virtual void ShowContextMenu( 
   Point pos
) 
C++/CLI 
public:
virtual void ShowContextMenu( 
   Point pos
) 

Parameters

pos
A Point object that specifies the coordinates at which to display the menu. These coordinates are specified relative to the client coordinates of the Viewer.

Example

Displays the automation context menu.

Visual BasicCopy Code
Public Sub AnnAutomation_ShowContextMenu(ByVal automation As AnnAutomation)
   ' show the context menu at the current cursor coordinates
   Dim pos As Point = Cursor.Position
   pos = automation.Viewer.PointToClient(pos)
   automation.ShowContextMenu(pos)
End Sub
C#Copy Code
public void AnnAutomation_ShowContextMenu(AnnAutomation automation) 

   // show the context menu at the current cursor coordinates 
   Point pos = Cursor.Position; 
   pos = automation.Viewer.PointToClient(pos); 
   automation.ShowContextMenu(pos); 
}

Remarks

This method will display the context menu in ContextMenu. This AnnAutomation will call this method when the user right-clicks the mouse cursor anywhere in the Container surface but not on any of the objects currently in the container. You can call this method to show this context menu manually (for example, as a result from clicking on a certain menu item in your application).

If the ContextMenu value is null (Nothing in Visual Basic), this method will not do anything.

If a click is on an object, this AnnAutomation object will call the ShowObjectContextMenu method instead.

Call the CanShowObjectContextMenu property to determine if the AnnAutomation is currently in a state where the object context menu can be shown

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features