Well, that was not a problem. First off all the position of the focus must be known. There is a grid, where the focus is usually been located. The exact position of a screen is not known.
Here is some of the code...
ycoord=Thisform.Pageframe1.Page1.Grid1.Top + ;
Thisform.Pageframe1.Page1.Grid1.HeaderHeight +;
((Thisform.Pageframe1.Page1.Grid1.Activerow-1) * Thisform.Pageframe1.Page1.Grid1.Rowheight)
This "ycoord" is not correct and the mouse is going to a wrong place.
After that, follows the click of a mouse.
Tapani
>Something like this:
>
>
>*Control.GotFocus
>
>MOUSE AT this.top, this.left PIXELS WINDOW (Thisform.name)
>
>
>
>
>>Hi, I need to know the exact place of the grid/form, where the focus is located. After that the mouse should be located and clicked at the same place.
>>I've tried to use OBJTOCLIENT() and many other things, but not succeeded to run it properly.
>>
>>There is usually one form and there one grid in it. The focus could be everywhere in the grid.
>>
>>Please give some hint.
>>
>>Tapani