Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clear buffer of mouse clicks
Message
From
15/01/1999 18:25:30
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00176355
Message ID:
00176772
Views:
41
>Fred,
>
>If I have a long running process in the Click of a button I do this:
>
>this.Enabled = .f.
>* do a whole bunch of stuff
>this.Enabled = .t.
>
>Which seems to help, the user generally doesn't go clicking disabled items. You can also use = inkey( 0.01, "HM" ) to suck up mouse clicks, but may have other side effects on the cursor if you have controls like textboxes on the form.
>
>Now, if you go placing DoEvents in there you may allow the user to kick off another long running process from another button while the first is still running.
>
>>>>No, I have not tried your test. The "processing" I was referring to was SQLs to build a cursor for a report and running the report. When I used to return from the report, if the user had pressed the button while this was going on, the report would run again. DOEVENTS stopped that for me.

It doesn't quite allow them to start another process, not at least until the first one finishes. But having the DOEVENTS in the click of the button did stop THAT button from being re-executed, but it did not stop another button from being pressed.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform