Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detect MouseUp off _screen
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01399106
Message ID:
01399199
Views:
37
>I am building a form where the user moves objects around the form. The form has virtual columns and the object needs to re size to the column width on MouseUp. I have all this working. The problem comes when the user drags an object to the far right column and the mouse pointer is off the screen when they let go of the button. VFP does not detect the MouseUp if the mouse pointer is not over the VFP _screen.
>
>Anyone got any ideas? I'm thinking about maybe using a windows API call but before I start digging for that I thought I would ask. BTW, does anyone know the Windows API call for MouseUp?

I figured out a way to do it.

I set a flag property in the form from the MouseMove event of the object I am moving. Then I call the re-size procedure from the MouseMove of the Form if the flag is still true. Thus, when the user releases the mouse button off of the screen, as soon as the mouse passes back over the screen the re-size proc gets called. I left enough margin around the form so the screen does get hit before the mouse passes over any object.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Reply
Map
View

Click here to load this message in the networking platform