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




pageIndex
Specifies the index of the page which contains the selected zone. This index is zero-based.
Deletes the selected zone from the zone list in the specified page.

Syntax

Visual Basic (Declaration) 
Public Sub RemoveSelectedZone( _
   ByVal pageIndex As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As RasterDocumentEngine
Dim pageIndex As Integer
 
instance.RemoveSelectedZone(pageIndex)
C# 
public void RemoveSelectedZone( 
   int pageIndex
)
Managed Extensions for C++ 
public: void RemoveSelectedZone( 
   int pageIndex
) 
C++/CLI 
public:
void RemoveSelectedZone( 
   int pageIndex
) 

Parameters

pageIndex
Specifies the index of the page which contains the selected zone. This index is zero-based.

Example

Visual BasicCopy Code
Public Sub RemoveSelectedZoneExample()
   ' 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
   'select a zone

   Try
      rasterDocument.RemoveSelectedZone(0)
      MessageBox.Show("The selected zone is deleted from Zone list in the page")
   Catch ex As Exception
      MessageBox.Show(ex.Message)
   End Try

   rasterDocument.Shutdown()
End Sub
C#Copy Code
public void RemoveSelectedZoneExample() 

   // Note that this is a sample key, which will not work in your toolkit 
   RasterSupport.Unlock(RasterSupportType.Ocr, "TestKey"); 
   RasterDocumentEngine rasterDocument; 
   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 
   // select zone 
 
   try 
   { 
      rasterDocument.RemoveSelectedZone(0); 
      MessageBox.Show("The selected zone is deleted from Zone list in the page"); 
   } 
   catch (Exception ex) 
   { 
      MessageBox.Show(ex.Message); 
   } 
 
   rasterDocument.Shutdown(); 
}

Remarks

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