Occurs when the user rotates the mouse wheel on a mouse device that has a wheel.
PROCEDURE Object.MouseWheel LPARAMETERS nDirection, nShift, nXCoord, nYCoord |
Parameters
You must include an LPARAMETERS or PARAMETERS statement in the event procedure and specify a name for each parameter. Visual FoxPro passes the MouseWheel event parameters in the following order.
- nDirection
- Contains a mouse device dependent number that indicates the direction the mouse wheel is rotated. A negative value indicates the mouse wheel is rotated backwards; a positive value indicates the mouse wheel is rotated forwards.
- nShift
-
Contains a number specifying the state of modifier keys when the mouse wheel is rotated. The valid modifier keys are the SHIFT, CTRL, and ALT keys.
The values returned in nShift for individual modifier keys are listed in the following table.
If more than one modifier key is held down when the mouse wheel is rotated, the nShift argument contains the sum of the values for the modifier keys. For example, if the user holds CTRL while rotating the mouse wheel, the nShift argument contains 2. But if the user holds CTRL+ALT while rotating the mouse wheel, the nShift argument contains 6.Value Key 1
SHIFT
2
CTRL
4
ALT
- nXCoord, nYCoord
- Contains the current horizontal (nXCoord) and vertical (nYCoord) position of the mouse pointer within the form. These coordinates are always expressed in terms of the form's coordinate system, in the unit of measurement specified in the ScaleMode property setting.
Remarks
Applies To: CheckBox | Column | ComboBox | CommandButton | CommandGroup | Container Object | Control Object | EditBox | Form | Grid | Header | Image | Label | Line | ListBox | OptionButton | OptionGroup | Page | PageFrame | Shape | Spinner | TextBox | ToolBar