Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keep a form modal after calling a msgbox
Message
 
À
07/04/2006 17:04:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01111579
Message ID:
01143328
Vues:
16
I think MessageBox being called from modal forms is what's causing all our "Modal form loses focus" problems.

All our apps use modal forms, and we tend to have problems after "form1" calls "form2" which calls "form3" then using MessageBox in Form3's click method (which may call some other core code to do stuff). This completes OK but sometimes form3 loses focus to form2 - form3 should be still visible as not released yet and have focus, yet form2 becomes visible and buttons press but do nothing, and moving the form around shows "form3" beneath it. I'm betting MessageBox has a lot to do with this problem...

Please don't bother lecturing me about the virtues of modeless apps - been there, done that, and it's not the issue.

Heck, I bet if I replaced MessageBox with our own version (which I really don't want to have to do) the problem would go away. Alternatively could create a better application object that forms ply with a list of forms called so that the correct form retains focus. However, this shouldn't be necessary and having to work around something as useful as Messagebox is a right pain.

Just my twopence worth.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform