Modal Form from a child form

  • Thread starter Thread starter El Alquimista
  • Start date Start date
E

El Alquimista

Hi, I have a little problem, I have a MDI form (Main Menu), this form
open a child form (A), and I need to open a form B as modal form from
form A. I can to this with showDialog(), but it open form B outside
MDI form (Main Menu) and it is showed on the windows bar as another
application opened.
So the question is, there are any way to open a modal form from a
child form inside a MDI form?

Thanks
 
El said:
Hi, I have a little problem, I have a MDI form (Main Menu), this form
open a child form (A), and I need to open a form B as modal form from
form A. I can to this with showDialog(), but it open form B outside
MDI form (Main Menu) and it is showed on the windows bar as another
application opened.
So the question is, there are any way to open a modal form from a
child form inside a MDI form?

No. A dialog (i.e. Form displayed modally using the ShowDialog()
method) is required to be a top-most window, which precludes the
possibility of it being an MDI child.

If you don't want it to show up in the task bar, you can simply set the
ShowInTaskbar property of your dialog form to "false" (either in the
Designer, or when you actually show it). But the dialog itself must be
a separate window.

Pete
 
No.  A dialog (i.e. Form displayed modally using the ShowDialog()
method) is required to be a top-most window, which precludes the
possibility of it being an MDI child.

If you don't want it to show up in the task bar, you can simply set the
ShowInTaskbar property of your dialog form to "false" (either in the
Designer, or when you actually show it).  But the dialog itself must be
a separate window.

Pete

Thanks pete for your answer!! I will try it
 
Back
Top