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




Draws a selection rectangle around the zone located at the specified point.

Overload List

OverloadDescription
SelectZoneByPoint(Graphics,Int32,Point) Draws a selection rectangle around the zone located at the specified point.  
SelectZoneByPoint(IntPtr,Int32,Point) Draws a selection rectangle around the zone located at the specified point.  

Example

Visual BasicCopy Code
Public Sub SelectZoneByPointExample(ByVal graph As Graphics)
   ' Note that this is a sample key, which will not work in your toolkit
   RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey")

   Dim rasterDocument As RasterDocumentEngine
   rasterDocument = RasterDocumentEngine.Instance
   rasterDocument.Startup()
   'assume page is added, refer to AddPage example for more information
   'assume zones are added, refer to AddZone example or FindZones for more information

   Dim pt As Point = New Point(100, 100)
   rasterDocument.SelectZoneByPoint(graph, 0, pt)
   MessageBox.Show("The selected zone index = " & rasterDocument.SelectedZoneIndex)
   rasterDocument.Shutdown()
End Sub
C#Copy Code
public void SelectZoneByPointExample(Graphics graph) 

   // Note that this is a sample key, which will not work in your toolkit 
   RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey"); 
 
   RasterDocumentEngine rasterDocument; 
   rasterDocument = RasterDocumentEngine.Instance; 
   rasterDocument.Startup(); 
 
   // assume page is added, refer to AddPage example for more information 
 
   Point pt = new Point(100, 100); 
   rasterDocument.SelectZoneByPoint(graph, 0, pt); 
   MessageBox.Show("The selected zone index = " + rasterDocument.SelectedZoneIndex); 
   rasterDocument.Shutdown(); 
}

Remarks

Draws a selection rectangle around the zone that contains the specified point.
This method will update the SelectedZoneIndex property value if it finds a zone that contains the specified point. To draw a page, call DrawPage.
For more information, refer to Drawing Pages and Zones.

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.Documentrequires a Document or Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features