Check
How can I make my form Modal/Modeless on the fly. FAQ #7921
>
>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.
--sb--