Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DOEVENTS - Absolute position of mouse
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00155157
Message ID:
00155418
Views:
37
Dave,

Thanks much. I noticed that you are moving the mouse before issuing DoEvents.
I move it after the command. Which brings up another thought here. I noted in the last thread the use of DoEvents() written as a function call rather than a command DOEVENTS. And you wrote it that way here too. Am I missing something?
Do appreciate a reprint of the code though.

Thanks again,
Steve

>Steve,
>
>Here's what my routine looks like at the moment. It's a little different than first posted.
>
>
* FastDoEvents.prg 30-Sep-98
>
>* this workaround speeds up a DoEvent call
>
>local lnRow, lnCol, lcWindow
>
>lcWindow = wontop()
>lnRow = mrow( lcWindow )
>lnCol = mcol( lcWindow )
>if ( lnRow > 0 ) and ( lnCol > 0 )
>   * mouse still within VFP window, so it's ok to mouse
>   mouse at mrow(), mcol() window (lcWindow)
>endif
>
>DoEvents()
>
>>I followed a thread here a while back regarding the DOEVENTS command and that it required the mouse to move in order for it to really take effect. Since then, I've done a .DoFastEvents() which moves the mouse 1 pixel and it works great, but...... there could be several forms up at any given time and the mouse may not be over the active form when this method is called. I'm often finding my mouse shooting over to the far left as MROW() or MCOL() is returning -1. How can I absolutely determine the x & y of the mouse, move it and then return it to it's exact position regardless of what form is active and where the mouse it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform