Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modal Calling Modal (Ugh!)
Message
From
24/05/2012 12:35:47
 
 
To
24/05/2012 11:41:04
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01544295
Message ID:
01544297
Views:
98
My suggestion is to rethink the design. Either non-modal or modal with tabs or expanding the modal form if needed. Modal on Modal is messy and sometimes confuses the user if they want to close the app, it refuses and they sometimes can't figure out why. (I've seen this happen).

>I am encountering the long-standing VFP bug that sometimes afflicts calling a modal form from a modal form. In my case, the called form ends up behind the calling form, the close boxes of both are disabled, and the only way out is to press Esc a couple times to close both forms. (Ugh!)
>
>Poking around online, one suggested fix is to put the following code in the Activate of my forms --
>
>IF Thisform.WindowType = 1
> Thisform.AlwaysOnTop = .T.
> Thisform.AlwaysOnTop = .F.
>ENDIF
>
>-- but that does not work for me. Other than going modeless (e.g., Paul Mrozowski's suggested alternative to modal), are there any other possible fixes worth trying?
>
>-m.
>
>(P.S. FWIW, to others who might be grappling with this: Getting an initial grip on the problem was difficult, because the behavior was intermittent. I was finally able to determine that, in my case, the behavior was only occurring when I tabbed between controls on any of modal forms in the "stack" before calling the problematic form -- i.e., if Modal1 calls Modal2 and Modal2 calls problematic Modal3, then Modal3 exhibits the problematic behavior only if I have tabbed between controls in either Modal1 or Modal2 before calling Modal3.)
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform