Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8532945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:50:05+00:00 2026-06-11T09:50:05+00:00

I am working in Desktop application in C#. I have an MDI Parent form

  • 0

I am working in Desktop application in C#. I have an MDI Parent form having Panel control for adding Child Forms in it.
I have 2 childs forms:

  1. ChildForm1
  2. ChildForm2

Childform2 is opened from childform1.

From MDI form i add childform1 to panel control, know i want to add childform2 also to mdi Form panel control. When i click button on childform1, from mdi form panel control childform1 must be removed and childform2 will be added to mdi form panel control.

How to solve this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:50:07+00:00Added an answer on June 11, 2026 at 9:50 am

    You first open ChildForm2 from ChildForm1 by passing refrence of ChildForm1 to ChildForm2

     ChildForm2 objChildForm2 = new ChildForm2(this);
     objChildForm2.MdiParent = this.MdiParent;
     objChildForm2.Show();
    

    Now Go to your ChildForm2 and Add Parametrize contructor also create Global object of ChildForm1

    ChildForm1 objChildForm1 = null;
    
     public ChildForm2(ChildForm1 obj)
        {
            InitializeComponent();
    
            objChildForm1 = obj; // Passing refrence of ChildForm1
            obj.Hide(); // this will hide the ChildForm1
        }   
    

    Now when your ChildForm2 open ,the obove parametrize constructor will call and it will hide your ChildForm1.
    Also you can reopen your ChildForm1 on close of ChildForm2.Write following code for that.

        private void btnClose_Click(object sender, EventArgs e)
        {
    
            objChildForm1.Show();// you can access all public members of ChildForm1 by the Global   //object "objChildForm1"
            this.Close();
        } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with WPF and EF 4.2 to build a desktop application. I have
I am working on a desktop application that returns list of tables that have
I'm working on a desktop (swing) application with Eclipse IDE. I have three comboboxes
I am working on a small AIR desktop application and I have some configuration
I have to create a desktop application in java. I have experience in working
I Working on desktop application where i am get struck. I have a method
I have used ProgressBar Control in my c# desktop application.I have used it in
I'm working on a desktop application in C# (.NET 4.0). I have a datagridview
I've started working on a Java desktop application using netbeans. I have 7 different
I'm working on a desktop application that will produce several in-memory datasets as an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.