Click here to Skip to main content
15,171,053 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
In my application I have a main page with a menustrip to navigate to other forms Since i want it to be opened always I set it as a MDICONTAINER .now I need to open a form on menustripclick event as child i set the form like this
C#
public partial class MainForm : Form
   {
       public MainForm()
       {

           InitializeComponent();
           this.IsMdiContainer = true;
           loginmain();


           intialsetupform();

       }

       private void companyToolStripMenuItem_Click(object sender, EventArgs e)
       {
           Master.CompanyMasterForm cmpnymasterform = new Master.CompanyMasterForm();
         cmpnymasterform.MdiParent= this ;

           cmpnymasterform.Show();
       }}





All was Ok and I got the childwindows work correctly
but Now i need to add two panels in the mainform << one for showing status meddages and other for showing some other controls

I had added the panel and anchored them and the issue is that now when the child window opens all the panels and controls of the parentform(mainform) comes above the childwindow controls which make it unreadable Please provide any ideas to overcome this
Posted

Here is the idea: who needs MDI, ever? Why torturing yourself and scaring off your users?
Do yourself a great favor: do not use MDI at all. You can do much easier to implement design without it, with much better quality. MDI is highly discouraged even by Microsoft, in fact, Microsoft dropped it out of WPF and will hardly support it. More importantly, you will scare off all your users if you use MDI. Just don't. I can explain what to do instead. Please see:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages[^],
Question on using MDI windows in WPF[^],
MDIContainer giving error[^],
How to Create MDI Parent Window in WPF?[^],
How to set child forms maximized, last childform minimized[^].

—SA
   
Please try by setting the "TopMost" property to true.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900