|(Declarations)||Declarations||Declarations and private variables for the CMouseInfo class.|
|Buttons||Property||Get the number of mouse buttons.|
|CursorHeight||Property||Get the height of the mouse cursor.|
|CursorWidth||Property||Get the width of the mouse cursor.|
|DoubleClickHeight||Property||Get the height of the double click area. This property is the height, in pixels, of the rectangle in which two mouse clicks will be considered a double click. The first and second mouse clicks must both occur in this rectangle.|
|DoubleClickSpeed||Property||Get the double click speed. A double click occurs when there are two clicks of a mouse button, the second occurring within a given time of the first. This property is the maximum time, in milliseconds, that can elapse between the first and second click, and still be considered a double click.|
|DoubleClickWidth||Property||Get the width of the double click area. This property is the width, in pixels, of the rectangle in which two mouse clicks will be considered a double click. The first and second mouse clicks must both occur in this rectangle.|
|DragHeight||Property||Get the height of the drag area. This property is the height, in pixels, of a rectangle centered on a drag point to allow for limited movement of the mouse pointer before a drag operation begins. This allows the user to click and release the mouse button easily without unintentionally starting a drag operation.|
|DragWidth||Property||Get the width of the drag area. This property is the width, in pixels, of a rectangle centered on a drag point to allow for limited movement of the mouse pointer before a drag operation begins. This allows the user to click and release the mouse button easily without unintentionally starting a drag operation.|
|MousePresent||Property||Get the status of a mouse.|
|MouseSpeed||Property||Get the mouse speed. This property can have the values 0 through 2. This property represents the speed of the mouse cursor relative to the distance the mouse has moved. This property works in conjunction with the MouseThreshold1 and MouseThreshold2 properties.|
|MouseThreshold1||Property||Get the mouse threshold 1 value. This property can have the values 0 through 12. This property works in conjunction with the MouseSpeed and MouseThreshold2 properties.|
|MouseThreshold2||Property||Get the mouse threshold 2 value.|
|MouseTrails||Property||Get the status of MouseTrails.|
|SnapToDefault||Property||Get the status of the SnapToDefault property.|
|SwapButtons||Property||Determine whether the mouse buttons are swapped.|
|WheelLines||Property||Get the number of lines to scroll when the mouse wheel is rotated.|
|WheelPresent||Property||Get the presence of a mouse wheel.|
' Example of CMouseInfo ' ' To use this example, create a new module and paste this code into it. ' Then run the procedure by putting the cursor in the procedure and pressing: ' F5 to run it, or ' F8 to step through it line-by-line (see the Debug menu for more options) Private Sub Example_CMouseInfo() ' Comments: Example of using the CMouseInfo class to get mouse information in VB6 and VBA with 32 and 64 bit Windows API calls. ' Run this procedure and see the information in the Immediate Window. Dim clsMouseInfo As CMouseInfo Set clsMouseInfo = New CMouseInfo ' Print mouse information Debug.Print "Mouse Buttons = " & clsMouseInfo.Buttons Debug.Print "Cursor Height = " & clsMouseInfo.CursorHeight Debug.Print "Cursor Width = " & clsMouseInfo.CursorWidth Debug.Print "DoubleClick Height = " & clsMouseInfo.DoubleClickHeight Debug.Print "DoubleClick Speed = " & clsMouseInfo.DoubleClickSpeed Debug.Print "DoubleClick Width = " & clsMouseInfo.DoubleClickWidth Debug.Print "Drag Height = " & clsMouseInfo.DragHeight Debug.Print "Drag Width = " & clsMouseInfo.DragWidth Debug.Print "Mouse Present = " & clsMouseInfo.MousePresent Debug.Print "Mouse Speed = " & clsMouseInfo.MouseSpeed Debug.Print "Mouse Threshold1 = " & clsMouseInfo.MouseThreshold1 Debug.Print "Mouse Threshold2 = " & clsMouseInfo.MouseThreshold2 Debug.Print "Mouse Trails = " & clsMouseInfo.MouseTrails Debug.Print "Snap to Default = " & clsMouseInfo.SnapToDefault Debug.Print "Swap Buttons = " & clsMouseInfo.SwapButtons Debug.Print "Wheel Lines = " & clsMouseInfo.WheelLines Debug.Print "Wheel Present = " & clsMouseInfo.WheelPresent Set clsMouseInfo = Nothing End Sub
The source code in Total Visual Sourcebook includes modules and classes for Microsoft Access, Visual Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily add this professionally written, tested, and documented royalty-free code into your applications to simplify your application development efforts.
Total Visual SourceBook is written for the needs of a developer using a source code library covering the many challenges you face. Countless developers over the years have told us they learned some or much of their development skills and tricks from our code. You can too!
Supports Access/Office 2016, 2013, 2010 and 2007, and Visual Basic 6.0!
"The code is exactly how I would like to write code and the algorithms used are very efficient and well-documented."
Van T. Dinh, Microsoft MVP