Returns the row position of the mouse pointer in the main Visual FoxPro window or in a user-defined window or form.
MROW([cWindowName | 0 [, nScaleMode]])
- Specifies the name of a window whose mouse-pointer row position MROW(В )returns.
- Specifies that the row position of the mouse pointer is returned for the currently active window or form.
Specifies the unit of measurement for the value MROW(В ) returns. The settings for nScaleMode are:
A foxel is equivalent to the average height and width of a character based on the current font of the form in which an object is contained.
A pixel is the smallest element that can be displayed on a screen or printer. Pixels are screen-dependent.
Numeric. MROW(В ) returns the following under specific conditions:
If there is no active user-defined window, and you omit the optional argument, MROW(В ) returns the main Visual FoxPro window row position of the mouse pointer.
If there is an active user-defined window, and you omit the optional argument, MROW(В ) returns the mouse-pointer row coordinate relative to the active user-defined window.
If the mouse pointer is positioned outside the user-defined window or if no mouse driver is loaded and there is no output window, MROW(В ) returns a value of -1.
Using the MROW(В ) function without the optional argument 0 may affect the behavior of code on forms when the FormВ AllowOutput property IS set to false (.F.). For example, the placement of a shortcut menu that is defined in the RightClick event may not display in the proper location if you use the MROW(В ) and MCOL(В ) functions to determine where the menu is displayed. In this case, be sure to include 0 in the MROW(В ) and MCOL(В ) functions.