Goofy quirk in MDI title bar

G

Guest

Hello,

I apologize for multiple posting of this question but I used the wrong
acronym earlier. I meant to say MDI.

I would certainly appreciate some feedback to the issue I'm experiencing in
my first major MDI 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/MDI-goof.jpg

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

Thanks in advance,

Andre Ranieri
 
G

Guest

The problem appears to be happening when I open
a window from the title bar of the MDI parent itself. Each time I click on
one of the title bar buttons in th MDI parent it creates another menu bar
item, even though all the child forms are disposed.

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();
 

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