Hi!
I know about that method. I just was curious about new way of doing that, because there is well-known problem in the code you posted - when mouse moves quite quickly, it goes out of form and than VFP MouseMove event don't fire at all until you return mouse back over the VFP form. I just want to know if that way in samples in Files section solves the problem.
Thanks anyway.
>>Hi!
>>
>>I have seen all you mentioned. that code just do not work. I click on the form trying to drag it -> nothing happens. What might prevent that code from functioning properly?
>>
>
>Vlad,
>
>If you don't get the other code to work, here's some code that should: (All VFP)
>
>Add two properties to your form (XStart, YStart).
>
>In the from MouseDown:
>
>IF nButton=1
> this.XStart = nXCoord
> this.YStart = nYCoord
>ENDIF
>
>
>In the form MouseMove:
>
>IF nButton=1
> this.Left = nXCoord + OBJTOCLIENT(this,2) - this.xstart
> this.Top = nYCoord + OBJTOCLIENT(this,1) - this.ystart
>ENDIF
>
>
>If you want to do this with a form that has a titlebar, just subtract the
>titlebar size (SYSMETRIC(9)) from the above calculation for Top.
>
>HTH!
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.