morahman

morahman

  • NA
  • 1
  • 0

MDI Child form not showing properly after hiding

Jan 11 2005 7:39 PM
I have a MDI application in which there are child forms with web(Browser) control in it.I programatically hide all the child forms by calling Hide() method. But when I try to make them visible by calling Show() method, the app shows two weird behaviours as follows, 1. The child form is shown as a seperate window on the taskbar and yet it is still inside parent window. 2. Web control (Browser) doesn't navigate to the given URL. Its area in the child form is frozen Following is the code snippet //Code to add child form. { ChildForm frmObj = new ChildForm (); frmObj.MdiParent = this; FrmList.Add(frmObj); frmObj.Show(); //LoadBrowser is a method in which we navigate to a //website. The reason we do this way is because the //web control was not loading if we try to navigate //it in the ChildForm's Form_Load event. frmObj.LoadBrowser(); } //Code to Hide all Child forms private void btnHide_Click(object sender, System.EventArgs e) { foreach(Form FrmObj in FrmList) FrmObj.Hide(); } //Code to show all child forms private void btnShowAll_Click(object sender, System.EventArgs e) { foreach(ChildForm FrmObj in FrmList) { FrmObj.Show(); FrmObj.LoadBrowser(); } } Note: Everything works fine if ChildForm has regular controls. Issue is only when there is web control in the childform and it is MDI scenario.