Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keep a form modal after calling a msgbox
Message
 
To
07/04/2006 17:04:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01111579
Message ID:
01143328
Views:
14
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform