MOUSEINPUT Structure
Type MOUSEINPUT
dx As Long
dy As Long
mouseData As Long
dwFlags As Long
time As Long
dwExtraInfo As Long
End Type
Description & Usage
The MOUSEINPUT structure holds information about a mouse input event. The various data members identify the nature of the input.
Visual Basic-Specific Issues
None.
Data Members
- dx
- Specifies either the x-coordinate of absolute mouse movement or the amount of relative movement along the x-axis. For relative motion, positive values move right and negative values move left.
- dy
- Specifies either the y-coordinate of absolute mouse movement or the amount of relative movement along the y-axis. For relative motion, positive values move down and negative values move up.
- mouseData
- Windows NT, 2000: If dwFlags contains MOUSEEVENTF_WHEEL, this specifies the amount of wheel movement, in integer multiples of WHEEL_DATA. Positive values mean forward (away) rotation, and negative values mean backwards (toward) rotation. Windows 2000: If dwFlags contains either MOUSEEVENTF_XDOWN or MOUSEEVENTF_XUP, this is a combination of the following flags specifying which X buttons have been pressed or released:
- XBUTTON1
- The first X button was pressed or released.
- XBUTTON2
- The second X button was pressed or released.
- dwFlags
- A combination of the following flags specifying which mouse input information the event describes. Only specify button status information for those which have changed. Note that scroll wheel movement and X button status cannot be simultaneously specified because they both use the mouseData data member.
- MOUSEEVENTF_ABSOLUTE
- The dx and dy data members contain absolute mouse coordinates. In the coordinate system used by the function, the screen's upper-left corner has coordinates (0,0) and the lower-right corner has coordinates (65535,65535), regardless of the actual screen size. If this flag is not set, dx and dy contain relative coordinates, whose actual amount of movement depends on the current mouse speed and acceleration settings.
- MOUSEEVENTF_LEFTDOWN
- The left button was pressed.
- MOUSEEVENTF_LEFTUP
- The left button was released.
- MOUSEEVENTF_MIDDLEDOWN
- The middle button was pressed.
- MOUSEEVENTF_MIDDLEUP
- The middle button was released.
- MOUSEEVENTF_MOVE
- The mouse moved. The dx and dy data members specify the amount or location of the movement.
- MOUSEEVENTF_RIGHTDOWN
- The right button was pressed.
- MOUSEEVENTF_RIGHTUP
- The right button was released.
- MOUSEEVENTF_WHEEL
- Windows NT, 2000: The scroll wheel has moved. The dwData data member specifies the amount of movement.
- MOUSEEVENTF_XDOWN
- Windows 2000: An X button was pressed. The dwData parameter identifies which X buttons.
- MOUSEEVENTF_XUP
- Windows 2000: An X button was released. The dwData parameter identifies which X buttons.
- time
- The time stamp of the mouse input event, in milliseconds. If this is 0, the system provides a time stamp.
- dwExtraInfo
- An additional 32-bit value associated with the mouse event.
Constant Definitions
Const MOUSEEVENTF_ABSOLUTE = &H8000
Const MOUSEEVENTF_LEFTDOWN = &H2
Const MOUSEEVENTF_LEFTUP = &H4
Const MOUSEEVENTF_MIDDLEDOWN = &H20
Const MOUSEEVENTF_MIDDLEUP = &H40
Const MOUSEEVENTF_MOVE = &H1
Const MOUSEEVENTF_RIGHTDOWN = &H8
Const MOUSEEVENTF_RIGHTUP = &H10
Const MOUSEEVENTF_WHEEL = &H80
Const MOUSEEVENTF_XDOWN = &H100
Const MOUSEEVENTF_XUP = &H200
Const WHEEL_DELTA = 120
Const XBUTTON1 = &H1
Const XBUTTON2 = &H2
Used By
INPUT_TYPE
Go back to the alphabetical Structure listing.
Go back to the Reference section index.
Last Modified: August 11, 1999
This page is copyright © 1999 Paul Kuliniewicz.
Copyright Information Revised October 29, 2000
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/m/mouseinput.html