Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Having a form close itself
Message
De
08/06/2001 18:18:10
 
 
À
07/06/2001 19:36:43
Wayne Thomas
Cleansuite Software Inc
Calgary, Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00516650
Message ID:
00517266
Vues:
15
>Thanks for the responses but what we need is a large "wait window".
>
>We want a form that looks like the messagebox() but has the same behavior as a "wait window". We want to display a message and return the focus to the calling form. Then as soon as we have a keypress or mouse click we want this "wait window" form to close.
>
>We would rather not put code in the click or keypress event of everything.
>
>Wayne

Wayne,

I don't know how to handle the mouse part of the equation. But for keyboard, you don't have to put code in the keypress of everything. When you show your waitForm, you can:
do form waitForm name thisForm.waitForm noread
thisForm.keyPreview = .t.   && all keypress events go through 
                            && thisFrom.keypress() first

&& do other stuff here, like setFocus()
In the main form's KEYPRESS method:
LPARAMETERS nKeyCode, nShiftAltCtrl

if vartype(thisForm.waitForm)="O" && there is probably a better way to do this :)
	thisForm.waitForm.release()
	thisForm.keyPreview = .f.
endif
Of course, the form class needs to have a property called 'waitForm'. Does this get you any closer to what you want to do?
Steve Gibson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform