Megosztás a következőn keresztül:


MCOL( ) Function

Returns the column position of the mouse pointer in the main Visual FoxPro window or a user-defined window.

MCOL([cWindowName [, nScaleMode]])

Parameters

  • cWindowName
    Specifies the name of the window whose mouse-pointer column position MCOL( ) returns.
  • nScaleMode
    Specifies the unit of measurement for the value MCOL( ) returns. The following table lists the settings for nScaleMode.
    nScaleMode Description
    0 Foxels. 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. (Default)
    3 Pixels. A pixel is the smallest element that can be displayed on a screen or printer. Pixels are screen-dependent.

Return Values

Numeric. MCOL( ) returns the column position of the mouse pointer in the main Visual FoxPro window or a user-defined window.

If you omit cWindowName, and there is no active user-defined window, MCOL( ) returns the mouse pointer's column position in the main Visual FoxPro window. If you omit cWindowName, and there is an active user-defined window, MCOL( ) returns the mouse pointer's column position in the active user-defined window. MCOL( ) returns –1 if the mouse pointer is positioned outside the user-defined window or, if no mouse driver is loaded, and there is no output window.

Remarks

Using the MCOL( ) function without an optional argument might affect the behavior of code on forms when FormAllowOutput property set to False (.F.). For example, the placement of a shortcut menu that is defined in the RightClick event might not display in the proper location if you use the MCOL( ) function to determine where the menu is displayed. For more information, see

See Also

AMOUSEOBJ( ) | COL( ) | GridHitTest Method | INKEY( ) | ISMOUSE( ) | MROW( ) | ROW( ) | WCOLS( ) | WROWS( )