Search code examples
c#formswinformspanelmdi

Get ONLY panel from other forms to mdi containter


I'm creating an Inventory system and what I want to happen is when I click the buttons the content will change but not the header and navigation panel.

WHAT I ALREADY TRIED: -created panels and used panel.show()/panel.hide() (GETS out of control when I have created many panels and put it in same position as others, when I hide one, all of them is hidden.)

now my main form is a MDI container and I created new forms that contains ONLY the panels that I will be needing. I wanted to know if there's any way that I could get ONLY the panel from other form to the MDI container.

this is my MDI form


Solution

  • You can show your forms in panel. like

      panel1.Controls.Add(Form1);