Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form won't run modally
Message
 
 
À
28/01/2003 20:49:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00746504
Message ID:
00746564
Vues:
32
This message has been marked as the solution to the initial question of the thread.
Hi!

Top-level forms could not be modal. RTFM.

You should organize your process by another way - you should expect that method "Show" of second form finishes before that form really did something. In other words, the last statement "thisform.Show()" for first form should be moved and called in some event inside of the second form - when second form finishes it's work.

>I have a top level form that hides, calls another top level form then unhides when the second top level form finishes. There is quite a bit of processing that happens in the Init method of the second form so there is quite a pause between the first form hiding and the second form displaying.
>
>I am trying to keep my forms as loosely coupled as possible.
>
>I've tried the following in an effort to provide feedback to the user while the form loads....
>
>
>  local lcMsgText, loMsg, loJobEd
>
>  lcMsgText = 'Please wait while the Employee Time data is being prepared for you.'
>
>  do form forms\Msg name loMsg linked with lcMsgText
>
>  thisform.Hide()
>  do form forms\JobEditor name loJobEd linked noshow
>  loMsg.Hide()
>  loJobEd.Show(1)
>  thisform.Show()
>
>
>What happens is the Msg displays for a few moments, then JobEditor flashes on the screen, closes and I'm left back at the original calling form. I've tried using Show(0), (1), (2) just in case there was a typo in the Hacker's Gude to VFP 6.0. I've set JobEditor's windowstyle to modal. I've tried pulling out the Msg code and JobEditor's noshow parameter and the form just flashes before returning to the calling form.
>
>I am running VFP 6.0 sp5 on Windows XP Pro.
>Any insight or help would be greatly appreciated. :)
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform