>Is there someyhing that I do wrong or ...??
>
>I wrote some sample code that is drawing a rectangle
>
>The coordinates that pass to the function polygon, are that the coordinates from the desktop or from the _screen ???
>
>I would like to have a rectangle with x1=thisform.left y1=thisform.top width=100 height=100.
>
>this is my code
><<
>With Thisform
> Local HDC
> HDC = GetDC( .nHWND )
> .ArrayPoint.Points[1].X = thisform.left
> .ArrayPoint.Points[2].X = thisform.width
> .ArrayPoint.Points[3].X = thisform.width
> .ArrayPoint.Points[4].X = thisform.left
> .ArrayPoint.Points[1].Y = thisform.top
> .ArrayPoint.Points[2].Y = thisform.top
> .ArrayPoint.Points[3].Y = thisform.height
> .ArrayPoint.Points[4].Y = thisform.height
> Polygon( m.HDC, .ArrayPoint.GetString(), 4 )
> SelectObject( m.HDC, m.lnPrevBrush )
> DeleteObject( m.lnBrush )
> ReleaseDC( .nHWND, m.HDC )
>Endwith
It's hard to say. Assuming that the hWnd property you've gotten has been retrieved correctly, I'd get that they're the absolute values. IOW, relative to the Windows Desktop. Foxtools has a method (_GetWRect()) that maps to the API call GetWindowRect(), that'll return these co-ordinates. I've documented its use, along with everything else in Foxtools, in my "Extended Foxtools Help" file. It's available for download here at the UT in the files section under "Coding, Syntax, and Commands".
George
Ubi caritas et amor, deus ibi est