You can not show a MDIChild form as modal. their formStyle should be set
to fsNormal
    I have solved this problem in the following way.

    I have (I should have) an ancestor form in my project which is the
father of all other forms in the project. In the CreateParams method of this
form I set the FormStyle := fsMDIChild and Visible := true
    I have another form as ancestor of all modal forms in the project which
is itself a descendant of the main ancestor form. In the create params of
that form I set FormStyle := fsNormal and Visible := false. Why I set
visible := false here, because when you use the ShowModal method to show a
form as modal your form must not be visible otherwise you will get the
exception "can not show as modal a visible form" something like that... and
if you create the form in visible state and then hide it and show it as
modal, your modal forms will be flickering at creation time, especially on
slow machines...
    Now, it happens that in my project I open the same form as modal and
modless in some cases. The only way I could solve this problem was by using
a global variable (the only one in the whole project) which I use as a
condition in CreateParams method to set the FormStyle property as I want. If
you are facing this situation, inform me and I will provide you with more
details.

    Hope this helps
Vahan

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] Behalf
Of Glen Thompson
Sent: Tuesday, July 26, 2005 3:04 AM
To: [email protected]
Subject: RE: [delphi-en] making mdi child forms MODAL


More info pls?  Sounds like a contradiction in terms.
By their nature, you should always allow the use to
swap between MDI child forms (and tile etc).  If you want
a modal form why not use a modal form?

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Behalf Of dalewolver
Sent: Tuesday, 26 July 2005 9:19 AM
To: [email protected]
Subject: [delphi-en] making mdi child forms MODAL


Any tips on how to make childMdi forms act modal?




-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
Yahoo! Groups Links










-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]



----------------------------------------------------------------------------
----
YAHOO! GROUPS LINKS

  a..  Visit your group "delphi-en" on the web.

  b..  To unsubscribe from this group, send an email to:
   [EMAIL PROTECTED]

  c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


----------------------------------------------------------------------------
----




[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to