MouseDown, MouseMove Events

NI Vision for Visual Basic

MouseDown, MouseMove Events

Syntax

Sub ControlName_MouseDown(Button, Shift, x, y)

Sub ControlName_MouseMove(Button, Shift, x, y)

Applies To

CWIMAQViewer

Purpose

MouseDown fires when you click the mouse on the control.

MouseUp fires when you release the mouse on the control.

Remarks

For more information, refer to Visual Basic help.

Parameters

Button As Integer

Specifies the state of the mouse buttons. The Button argument can be any combination of the following values: 1 for the left button, 2 for the right button, or 4 for the middle button. For example, if both the left and right mouse buttons are pressed, the Button argument is 3 (1 + 2).

Shift As Integer

Specifies the state of the <Shift> key, <Alt> key, and <Ctrl> key. The Shift argument can be any combination of the following values: 1 for <Shift> , 2 for <Ctrl> , or 4 for <Alt> . For example, if you press the <Shift> and <Ctrl> keys, the value is 3 (1 + 2).

x As OLE_XPOS_PIXELS

Specifies the x-coordinate of the current pointer location.

y As OLE_YPOS_PIXELS

Specifies the y-coordinate of the current pointer location.

See Also

Click

DblClick