Leadtools.WinForms Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.8.31
OnClipCursorChanged Method
See Also  Example
Leadtools.WinForms Namespace > RasterImagePanViewer Class : OnClipCursorChanged Method




e
An EventArgs that contains the event data.
Raises the ClipCursorChanged event.

Syntax

Visual Basic (Declaration) 
Protected Overridable Sub OnClipCursorChanged( _
   ByVal e As EventArgs _
) 
Visual Basic (Usage)Copy Code
Dim instance As RasterImagePanViewer
Dim e As EventArgs
 
instance.OnClipCursorChanged(e)
C# 
protected virtual void OnClipCursorChanged( 
   EventArgs e
)
Managed Extensions for C++ 
protected: virtual void OnClipCursorChanged( 
   EventArgs* e
) 
C++/CLI 
protected:
virtual void OnClipCursorChanged( 
   EventArgs^ e
) 

Parameters

e
An EventArgs that contains the event data.

Example

This example overrides the virtual events of the RasterImagePanViewer class.

Visual BasicCopy Code
Public Class MyRasterImagePanViewer
   Inherits RasterImagePanViewer
   '.
   '.
   '.
   Protected Overrides Sub OnViewerChanged(ByVal e As EventArgs)
      MyBase.OnViewerChanged(e)
      Console.WriteLine("OnViewerChanged is called")
   End Sub

   Protected Overrides Sub OnRectangleColorChanged(ByVal e As EventArgs)
      MyBase.OnRectangleColorChanged(e)

      Console.WriteLine("OnRectangleColorChanged is called")
   End Sub

   Protected Overrides Sub OnImageColorChanged(ByVal e As EventArgs)
      MyBase.OnImageColorChanged(e)

      Console.WriteLine("OnImageColorChanged is called")
   End Sub

   Protected Overrides Sub OnClipCursorChanged(ByVal e As EventArgs)
      MyBase.OnClipCursorChanged(e)

      Console.WriteLine("OnClipCursorChanged is called")
   End Sub

   Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
      MyBase.OnPaint(e)

      Console.WriteLine("OnPaint is called")
   End Sub

   Protected Overrides Sub OnMouseDown(ByVal e As MouseEventArgs)
      MyBase.OnMouseDown(e)

      Console.WriteLine("OnMouseDown is called")
   End Sub

   Protected Overrides Sub OnMouseMove(ByVal e As MouseEventArgs)
      MyBase.OnMouseMove(e)

      Console.WriteLine("OnMouseMove is called")
   End Sub

   Protected Overrides Sub OnMouseUp(ByVal e As MouseEventArgs)
      MyBase.OnMouseUp(e)

      Console.WriteLine("OnMouseUp is called")
   End Sub

   Protected Overrides Sub OnLostFocus(ByVal e As EventArgs)
      MyBase.OnLostFocus(e)

      Console.WriteLine("OnLostFocus is called")
   End Sub

   Protected Overrides Sub OnSizeChanged(ByVal e As EventArgs)
      MyBase.OnSizeChanged(e)

      Console.WriteLine("OnSizeChanged is called")
   End Sub
End Class
C#Copy Code
public class MyRasterImagePanViewer : RasterImagePanViewer 

   //. 
   //. 
   //. 
   protected override void OnViewerChanged(EventArgs e) 
   { 
      base.OnViewerChanged(e); 
      Console.WriteLine("OnViewerChanged is called"); 
   } 
 
   protected override void OnRectangleColorChanged(EventArgs e) 
   { 
      base.OnRectangleColorChanged(e); 
 
      Console.WriteLine("OnRectangleColorChanged is called"); 
   } 
 
   protected override void OnImageColorChanged(EventArgs e) 
   { 
      base.OnImageColorChanged(e); 
 
      Console.WriteLine("OnImageColorChanged is called"); 
   } 
 
   protected override void OnClipCursorChanged(EventArgs e) 
   { 
      base.OnClipCursorChanged(e); 
 
      Console.WriteLine("OnClipCursorChanged is called"); 
   } 
 
   protected override void OnPaint(PaintEventArgs e) 
   { 
      base.OnPaint(e); 
 
      Console.WriteLine("OnPaint is called"); 
   } 
 
   protected override void OnMouseDown(MouseEventArgs e) 
   { 
      base.OnMouseDown(e); 
 
      Console.WriteLine("OnMouseDown is called"); 
   } 
 
   protected override void OnMouseMove(MouseEventArgs e) 
   { 
      base.OnMouseMove(e); 
 
      Console.WriteLine("OnMouseMove is called"); 
   } 
 
   protected override void OnMouseUp(MouseEventArgs e) 
   { 
      base.OnMouseUp(e); 
 
      Console.WriteLine("OnMouseUp is called"); 
   } 
 
   protected override void OnLostFocus(EventArgs e) 
   { 
      base.OnLostFocus(e); 
 
      Console.WriteLine("OnLostFocus is called"); 
   } 
 
   protected override void OnSizeChanged(EventArgs e) 
   { 
      base.OnSizeChanged(e); 
 
      Console.WriteLine("OnSizeChanged is called"); 
   } 
}

Remarks

Raising an event invokes the event handler through a delegate. The OnClipCursorChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Notes to Inheritors: When overriding OnClipCursorChanged in a derived class, be sure to call the base class's OnClipCursorChanged method so that registered delegates receive the event.

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