Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Doing a form in a procedure
Message
De
14/12/2006 11:55:13
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
14/12/2006 09:31:04
Marcus Hüneke
Heidelberger Druckmaschinen
Wiesloch, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Divers
Thread ID:
01177577
Message ID:
01177649
Vues:
8
>Hello,
>
>I have 2 Problems with VFP6
>
>1.
>Problem with forms:
>Inside a procedure ( of a form) I want to call a form which has a Cancel-Button.
>I want to give the user the opportunity to cancel the running program.
>I want this form to be visible for 5 seconds.
>If the user doesn't press the Cancel button (within 5 seconds) the procedure should be continued.
>but if I call my "Wait Form" with "do form wait" the procedure doesn't interrupt. It goes on processing.
>How can I force the procedure to stop and to read the cancel-Button?

For a form to stop the execution of the code which called it, it needs to be modal. That'd be your wait.scx - change its .windowtype to 1 (modal).

For the 5-second wait, add the timer as Martin said.

The assumption here is that you want the processing to stop when the wait form displays, and wait until user clicks cancel or 5 seconds elapse.

>2.
>Would be nice if the user could stop the procedure with the ESC-Button.
>I tried "on key label ESC " but it does not work.
>What can I do to interrupt the procedure with "ESC"?

You actually don't need any On Escape in such a form. Just set the cmdCancel.cancel=.t., assuming cmdCancel is the name of your cancel button.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform