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 7017719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:57:02+00:00 2026-05-27T22:57:02+00:00

I have one Main form and two types of child form MainForm ChildFormA –

  • 0

I have one Main form and two types of child form

MainForm
ChildFormA – unique
ChildFormB – have multiple forms of this type

I create ChildFormA with:

ChildFormA form1 = new ChildFormA();
form1.MdiParent = this;
form1.Show();

But when i close it with:

form1.Close();

I can’t re-open it.
I’ve already read some tips that I can Hide this form instead or closing it. But the X button still closes the form.
How to re-open or how to prevent the X button to close and simple hide it?

  • 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-05-27T22:57:03+00:00Added an answer on May 27, 2026 at 10:57 pm

    If you want your child form to remain in its state, you have to subscribe to the FormClosing event and set the Cancel property of the event argument to true.

    public ChildForm()
    {
        ...
        FormClosing += new FormClosingEventHandler(ChildForm_FormClosing);
    }
    
    
    void ChildForm_FormClosing(object sender, FormClosingEventArgs e)
    {
        e.Cancel = true;
        Hide();
    }
    

    Keep in mind, that you’re form will not get disposed, if you don’t add more logic to this.

    Otherwise, you can just create a new instance of it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two forms(one main form,and one submain form).I'd like to do something like
I have two forms,one is main and other is inherited form main.Lets say I
I have two forms, in the main one a have a crystalreportviewer and in
This question concerns Oracle Forms 10g. I have a form with two windows. The
I have a form like this: <form action='' onsubmit='void(0)' class=mainform> <label class=form3><input type=checkbox> One
I have WPF Application where I have One main form and other user controls
I have below html code in one of the opensource project. <form action=/wiki/bin/view/Main/Search> <div
We have one main project and two subprojects. One of the subprojects is the
I have a design of activities like this I have one main activity and
I have two pages one is the main page and the another one is

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.