Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Clear buffer of mouse clicks
Message
De
15/01/1999 18:25:30
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00176355
Message ID:
00176772
Vues:
42
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform