Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mouse click trapping
Message
From
22/12/2000 17:33:36
 
 
To
22/12/2000 14:05:54
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00455670
Message ID:
00456518
Views:
26
>>Sure it does, that's what the "M" as a parameter does. It returns a 151 when the mouse is clicked. Just what is it you're trying to accomplish?
>
>This is a snippet of the Timer event of the oTimer object that is checking for inactivity.
>
>* check if idle time shutdown is enabled...
>if this.bIdleTimeShutDown
>  * process if enabled
>  if this.iOldKeyValue =lastkey() && I need to check mouse-clicks here as well
>    if abs(val(sys(2)) -this.iIdleTimeStart) >this.iIdleTimeAllowed
>      this.ShutMeDown('due to timeout')
>    endif
>  else
>    this.iOldKeyValue =lastkey()
>    this.iIdleTimeStart = val(sys(2))
>  endif
>endif
>
>
>This code will work if the user press any key but will not process mouse-clicks. Putting the INKEY(.01,"MH") function does not really returns 151 unless the user 'happens' to click the mouse at .01 of the same second the timer event executes.
>
>To repeat, I need a way to capture a mouse-click from my oTimer object when the user is just clicking on menus, form buttons, etc. The oTimer runs in the same level as our oApplication object.
>
>Ramil 12/22

Not sure that you can get there from here. Since menu's aren't objects, you can't really capture those mouse clicks, at least not that I know of. For the rest, you'd need to set a flag in all of your baseclasses to indicate the mouse was clicked and/or moved, and then check that flag. Maybe there's some Windows API that could be useful to you here, but I can't think of any (not my strong suit).
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform