AMOUSEOBJ( ) Function

Creates an array containing information about the mouse pointer position and the object over which the mouse pointer is positioned.

AMOUSEOBJ(ArrayName [, 1])

Parameters

ArrayName

Specifies the name of the array containing the mouse pointer information. If the array you specify doesn't exist, Visual FoxPro automatically creates a four-row array. If the array exists, Visual FoxPro dimensions it to four rows.

The following table describes the contents of each row in the array:

Array row Description

1

Contains an object reference to the object over which the mouse pointer is positioned when AMOUSEOBJ( ) is executed.

2

Contains an object reference to the container of the object over which the mouse pointer is positioned when AMOUSEOBJ( ) is executed.

3

Contains the horizontal (X) coordinate in pixels of the mouse pointer, relative to the container of the object over which the mouse pointer is positioned when AMOUSEOBJ( ) is executed.

4

Contains the vertical (Y) coordinate in pixels of the mouse pointer, relative to the container of the object over which the mouse pointer is positioned when AMOUSEOBJ( ) is executed.

NoteNote

The first and second rows in the array can contain the same values if the mouse is positioned over a generic container such as a pageframe.

[, 1]

This optional parameter specifies that the mouse pointer information contained in the array is relative to the current form (THISFORM). If you include this option, the second array row always contains an object reference to the current form, and the third and fourth rows contain the mouse pointer coordinates relative to the current form.

Expand imageReturn Value

Expand imageRemarks

Expand imageSee Also


© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic