Modal Form from a child form

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
 
P

Peter Duniho

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
 
E

El Alquimista

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top