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 02:29:20
Herb Ellerbock
Customized Computer Systems
Australia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Switching a form between modal and modeless states
Miscellaneous
Thread ID:
01166834
Message ID:
01166834
Views:
58
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.
Next
Reply
Map
View

Click here to load this message in the networking platform