MdiParent Question

  • Thread starter Thread starter Jassim Rahma
  • Start date Start date
J

Jassim Rahma

I have a dialog form and appears on the top of MDIContainer (frmMain)
and I want when the user close the dialog form then an MDIChild should
be open on the frmMain. I tried:

myMDIChild.MdiParent = frmMain();


but it didn't work.. I also tried:


frmMain MainForm = new frmMain();
myMDIChild.MdiParent = MainForm;


with no luck. I am not getting any error message but the MDIChild form
is not openning..




Many Thanks,
Jassim Rahma
 
you are not calling .Show() after setting the MdiParent property, so in the
examples given you need to

myMDIChild.MdiParent = frmMain();
myMDIChild.Show();


--
HTH

Ollie Riches
http://www.phoneanalyser.net


Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a programmer
helping programmers.
 
I have a dialog form and appears on the top of MDIContainer (frmMain)
and I want when the user close the dialog form then an MDIChild should
be open on the frmMain. I tried:

myMDIChild.MdiParent = frmMain();


but it didn't work.. I also tried:


frmMain MainForm = new frmMain();
myMDIChild.MdiParent = MainForm;


with no luck. I am not getting any error message but the MDIChild form
is not openning..

I don`t understand your thinking. It`s better that you send us a hole code.
Maybe... myMDIChild.Show();
 
I am already calling Show() but sorry i forgot to paste it in my post.



Many Thanks,
Jassim Rahma
 
Back
Top