>Thanks for your reply. I don't think that will work. I should have been given a more complete description of what I am doing. I want to make a top level form moveable without a standard windows title bar. I want to be able to click on a portion of the form and drag the entire form around the windows desktop. I think can do it in the mouse down event and looping while MDOWN() if I know the absolute mouse coordinates within the windows desktop. This is the code I am using that almost works:
>
>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>LOCAL lnLastMrow, lnLastMCol
>IF nButton = 1
> lnLastMrow = MROW("",3)
> lnLastMCol = MCOL("",3)
> DO WHILE MDOWN()
> ThisForm.Top = ThisForm.Top + (MROW("",3) - lnLastMrow)
> ThisForm.Left = ThisForm.Left + (MCOL("",3) - lnLastMcol)
>
> lnLastMrow = MROW("",3)
> lnLastMCol = MCOL("",3)
> ENDDO
>ENDIF
Hi Ivan,
My suggestion won't work in VFP 5.0 were you had to remove the caption in order to get a form without a title bar. In 6.0 you just set the TitleBar property to 0. It still has a caption, which can be used to get the window handle you need to call _GetWRect().
However, it may not be necessary to use Foxtools. A top level form's Top and Left properties should be absolute to the desktop. MROW() and MCOL() should return the relative position of the mouse to the form.
Perhaps more info is needed here. So let me ask you what's not working right in your code sample?
George
Ubi caritas et amor, deus ibi est