Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Switching a form between modal and modeless states
Message
From
03/11/2006 04:12:43
 
 
To
03/11/2006 02:29:20
Herb Ellerbock
Customized Computer Systems
Australia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01166834
Message ID:
01166840
Views:
9
Hi,

From help:
You cannot change the WindowType setting once the window has been displayed.

So I may be wrong but I don't think it's possible...
Regards,
Viv

>Hi All,
>
>I want to be able to switch a form from modal to modeless and vice versa. To achieve this I have a custom method on the form containing the following code:
>
>
>PARAMETERS lnWindowType
>
>WITH THIS
>
>   * Hide the Form
>   .VISIBLE = .F.
>
>   * Form caption
>   IF lnWindowType = 0
>      .CAPTION = 'Modeless Form'
>   ELSE
>      .CAPTION = 'Modal Form'
>   ENDIF
>
>   * Show the Form
>   .SHOW(lnWindowType)
>
>ENDWITH
>
>
>I've tried calling this method from command buttons on the form and from On Key Label assignments. Both produce the same result. Modeless to modal works fine but modal to modeless does not.
>
>Switching from modal to modeless appears to work. The form's WINDOWTYPE property reverts to 0 but the behaviour remains modal.
>
>Any help with this would be much appreciated.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform