Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keep a form modal after calling a msgbox
Message
De
07/08/2006 11:57:40
 
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:
01143491
Vues:
15
>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.

Don't worry. I faced that situation as well where we had to design something like this. It is just based on the requirements. But, you may be right. Maybe the only solution would be to use your own message box form. By that, you would have it form ready and it would act accordingly as to what a form does.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform