CancelMouseEventArgs 构造函数

初始化 CancelMouseEventArgs 类的新实例。

命名空间:  Microsoft.Ink
程序集:  Microsoft.Ink(在 Microsoft.Ink.dll 中)

语法

声明
Public Sub New ( _
    mb As MouseButtons, _
    clicks As Integer, _
    x As Integer, _
    y As Integer, _
    delta As Integer, _
    cancel As Boolean _
)
用法
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 CancelMouseEventArgs(
    MouseButtons mb,
    int clicks,
    int x,
    int y,
    int delta,
    boolean cancel
)
public function CancelMouseEventArgs(
    mb : MouseButtons, 
    clicks : int, 
    x : int, 
    y : int, 
    delta : int, 
    cancel : boolean
)

参数

  • clicks
    类型:System.Int32
    按下并释放鼠标按钮的次数。
  • x
    类型:System.Int32
    鼠标单击的 x 坐标,以像素为单位。
  • y
    类型:System.Int32
    鼠标单击的 y 坐标,以像素为单位。
  • delta
    类型:System.Int32
    有符号计数,表示鼠标滚轮已转过多少轮槽数。
  • cancel
    类型:System.Boolean
    设置为 true 可以取消父控件的事件;否则设置为 false。

备注

轮槽是鼠标滚轮的一个槽口。有关轮槽的更多信息,请参见 MouseEventArgs.Delta Property(MouseEventArgs.Delta 属性)。

通常从事件处理程序获取 CancelMouseEventArgs 对象,因此不需要调用此构造函数。但是,如果决定生成一个涉及可以取消的鼠标事件的自定义事件,则可以使用此类,在这种情况下当引发该事件时将会调用该构造函数。

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

CancelMouseEventArgs 类

CancelMouseEventArgs 成员

Microsoft.Ink 命名空间