Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modal to Modeless and Back?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00112800
Message ID:
00113687
Views:
17
Sounds like the call to Show() may be modal (that is; the Show() code may be waiting for the newly shown modal form to close before continuing on. Just a late night wild guess.

If that is true, then maybe getting an external object to issue the Show() for you? Sounds corney, but sometimes it takes a strange solution to help out a strange problem.

But a different approach might be to just make the form AlwaysOnTop until they save or cancel the change.


>I have a modeless form which I need to change to modal when the user goes to add a record. After a bit of playing around I looked in "Hacker's Guide" and discovered that Granor & Roche say that "You can't change WindowType while the form is is displayed, but you can change it while it's hidden." Ok, so I do the following in the Add button click method ...
>
>
>With ThisForm
> .Hide()
> .WindowType = 1
> .Show()
>EndWith
>
>... and in the Save and Cancel button click methods...
>
>
>With ThisForm
> .Hide()
> .WindowType = 2
> .Show()
>EndWith
>
>... and it *almost* works. Add does exactly what I expected, the form goes modal and all is well. Save or Cancel, however, is a different story. The form looks like it resets correctly, all the buttons are back to the way they should be, but the form is still modal, in fact the close button, the control box close button don't work, notta!
>
>Granor & Roche go on to say in that same paragraph "However, we can't imagine why you'd want to change an existing form from modal to modeless or visa versa. That's bound to confuse the heck out of your users." ... well, leave it up to one of my clients to ASK for this!
>
>Any ideas?
>
>Thanks
R. Scott Mackay
Classy Components Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform