C#
VB
C++
Cancels the operation currently being performed in this AnnAutomation
public virtual void Cancel() Public Overridable Sub Cancel()
public:virtual void Cancel();
Cancels any operations currently being performed in this AnnAutomation. An operation can be:
This example cancels the drawing of new objects when the mouse is over a certain area on the viewer.
using Leadtools;using Leadtools.Annotations;using Leadtools.WinForms;using Leadtools.Drawing;public void AnnAutomation_Cancel(){// subclass to the viewer mouse move event// _automation is an AnnAutomation object_automation.Viewer.MouseMove += new MouseEventHandler(viewer_MouseMove);}private void viewer_MouseMove(object sender, MouseEventArgs e){// check if we have a draw designer currently selectedif (_automation.CurrentDesigner != null && _automation.CurrentDesigner is AnnDrawDesigner){// check if we are over the rectangle 100,100 to 200,200Rectangle rc = new Rectangle(100, 100, 100, 100);if (rc.Contains(e.X, e.Y))_automation.Cancel();}}
Imports LeadtoolsImports Leadtools.AnnotationsImports Leadtools.WinFormsImports Leadtools.DrawingPublic Sub AnnAutomation_Cancel()' subclass to the viewer mouse move event' _automation is an AnnAutomation objectAddHandler _automation.Viewer.MouseMove, AddressOf viewer_MouseMoveEnd SubPrivate Sub viewer_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs)' check if we have a draw designer currently selectedIf Not _automation.CurrentDesigner Is Nothing AndAlso TypeOf _automation.CurrentDesigner Is AnnDrawDesigner Then' check if we are over the rectangle 100,100 to 200,200Dim rc As Rectangle = New Rectangle(100, 100, 100, 100)If rc.Contains(e.X, e.Y) Then_automation.Cancel()End IfEnd IfEnd Sub
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
