Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drag&Drop Question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01212577
Message ID:
01212592
Views:
12
Kevin, check out OBJTOCLIENT() function.

>I'm trying to implement drag & drop in a container. I want to allow
>the user to move a command button inside the container.
>
>The help for the MouseMove event says:
>
>"nXCoord, nYCoord - Contains the current horizontal (nXCoord) and vertical
>(nYCoord) position of the mouse pointer within the form."
>
>So in the code below, how do I accuratly calculate the new position of the
>button so that it's always inside the container?
>
>
>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>
>IF nButton = 1 && Left button
>
>	This.Top = nYCoord
>	This.Left = nXCoord
>	
>	This.Drag()
>
>ENDIF
>
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform