goofy menu thing in WMI application title bar

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I would certainly appreciate some feedback to the issue I'm experiencing in
my first major WMI application. When I navigate to a new child form I
usually dispose of the one I'm navigating from, but I often end up with
multiple title bars as shown in the following screenshot. I've tried setting
the child forms' FormBorderStyle = None but that doesn't seem to help.

http://www.senske.com/images/wmi-goof.jpg

Can anyone please give me a few pointers to what I might be doing wrong?

Thanks in advance,

Andre Ranieri
 
Thanks for your assistance. The problem appears to be happening when I open
a window from the title bar of the MDI parent itself. Here is the code
called from the MDIMain form:

//only one child form allowed at a time: close all other child forms
if(form != this)
{
form.Dispose();
}
}

//create instance of new child form and show it.
Senske.SenskePro.Accounts.frmAccountSearch frm = new
Senske.SenskePro.Accounts.frmAccountSearch();
frm.MdiParent = this;
frm.StartPosition = FormStartPosition.WindowsDefaultLocation;
frm.WindowState = FormWindowState.Maximized;
frm.BringToFront();
frm.Focus();
frm.Show();
 
I've noticed that when I run the following code snippet there only appears to
be one form here that isn't disposed. However, it appears as if all the
disposed forms still have their title bars present in the MDI parent?


foreach(Form form in this.MdiChildren) //where mdiParent is the MDI
Container...
{
if(form != this)
{

form.Dispose();
}
}
 
Back
Top