Sdílet prostřednictvím


CancelMouseEventArgs Constructor

Initializes a new instance of the CancelMouseEventArgs class.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Syntax

'Declaration
Public Sub New ( _
    mb As MouseButtons, _
    clicks As Integer, _
    x As Integer, _
    y As Integer, _
    delta As Integer, _
    cancel As Boolean _
)
'Usage
Dim mb As MouseButtons 
Dim clicks As Integer 
Dim x As Integer 
Dim y As Integer 
Dim delta As Integer 
Dim cancel As Boolean 

Dim instance As New CancelMouseEventArgs(mb, clicks, _
    x, y, delta, cancel)
public CancelMouseEventArgs(
    MouseButtons mb,
    int clicks,
    int x,
    int y,
    int delta,
    bool cancel
)
public:
CancelMouseEventArgs(
    MouseButtons mb, 
    int clicks, 
    int x, 
    int y, 
    int delta, 
    bool cancel
)
public function CancelMouseEventArgs(
    mb : MouseButtons, 
    clicks : int, 
    x : int, 
    y : int, 
    delta : int, 
    cancel : boolean
)

Parameters

  • clicks
    Type: System.Int32

    The number of times the mouse button was pressed and released.

  • x
    Type: System.Int32

    The x-coordinate, in pixels, of a mouse click.

  • y
    Type: System.Int32

    The y-coordinate, in pixels, of a mouse click.

  • delta
    Type: System.Int32

    A signed count of the number of detents the mouse wheel has rotated.

  • cancel
    Type: System.Boolean

    Set to true to cancel the event for the parent control; otherwise false.

Remarks

A detent is one notch of the mouse wheel. For more information about detents, see MouseEventArgs.Delta Property.

In general, CancelMouseEventArgs objects are obtained from event handlers, so there is no need to call this constructor. However, if you decide to make a custom event involving mouse events that can be cancelled, you could use this class, in which case you would call the constructor when you raise the event.

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

CancelMouseEventArgs Class

CancelMouseEventArgs Members

Microsoft.Ink Namespace