>>>i have a grid in a form showing some records from a cursor
>>>
>>>now i also have another independent vfp exe running on another monitor where a form is to show the exact same records.
>>>
>>>
>>>Is there a way to get to know what records are shown in a grid
>>>If I can retrieve the current row I could skip back to the top rocord shown.
>>>
>>>Is that possible
>>>
>>>
>>>Peter
>>
>
>they both stay at 0
>what are they supposed to be doing
>
>Peter
The only way I know how to make two VFP exes "talk" to each other is by sharing information in a table. I don't doubt that there are ways to do it better, but I don't know them.
With this in mind and assuming that the second exe can replicate the recordsource for the grid in the first exe.........
The afterRowColumnChange method in the grid in the first exe can write its ActiveRow and Relative Row to a table the second exe can read. The second exe could do something like
SELECT infotable
lnActiveRow = nActiveRow
lnRelativeRow = nRelativeRow
SELECT (mygrid.recordsource)
GOTO lnActiveRow - lnRelativeRow + 1
myGrid.refresh
It probably needs some tweaking (especially if there are filters and/or indexes on the recordsource) and is completely untested but I
think that should make the two grids display the same set of records.
If not (and I certainly wouldn't be surprised to find it doesn't) I hope somebody else can come with something useful for you. I'll be interested in better solutions.
Good Luck...........Rich