Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Network:
Windows 2000 Server
>>To All:
>>
>>Is there an elegant way to wait for a modeless form to finish before the code continues? It's a top-level calling a top-level form. The called form does some calculations and returns (or sets) some values.
>>
>>I can think of a way by pausing execution, but wondered if there were others.
>>
>>TIA,
>
>1) Create a dummy in-top-level form (small and out of visible area). Call that passing modeless toplevel form's name. It calls toplevel form and provides 'modality'
>
>2) A timer control which is enabled to track toplevel called. Code that should run after return should be in a different method. Timer calls that method and disables itself when toplevel unloads.
>
>3) Put 'OnReturn' code to a custom method. Pass thisform to called toplevel. Called calls oCaller.OnReturn in unload.
>
>All work in older VFP versions too.
>Cetin
Cetin,
Very interesting idea. I especially like the hidden in-top-level form to provide the 'modality'; this will block unwanted events during the modeless form's execution.
Thanks!
-Irv.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement