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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:31:09+00:00 2026-05-13T09:31:09+00:00

I have three forms named frmBase(form1),frmGraph(form2) and frmBalloon(form3). frmGraph(form2) opens if the user clicks

  • 0

I have three forms named frmBase(form1),frmGraph(form2) and frmBalloon(form3).

frmGraph(form2) opens if the user clicks on the button named btnShow placed on frmBase(form1).

frmBalloon(form3) opens if the user clicks on the button named btnShow placed on frmGraph(form2).

Now if the user clicks on the button named btnCancel placed on the frmGraph(form2) OR clicks on the button named btnCancel placed on the frmBalloon(form3) every form that is open should be closed except frmBase(form1).

So, every forms should be closed except mainform when user clicks on the button placed on the form2 or form3. So for that is there any solution?

  • 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-13T09:31:09+00:00Added an answer on May 13, 2026 at 9:31 am

    It is not a great solution, Application.OpenForms is a bit unreliable, but easy:

    public static void CloseAllFormsButMain() {
      for (int ix = Application.OpenForms.Count - 1; ix > 0; --ix)
        Application.OpenForms[ix].Close();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have three forms: Form1 (Which is Mdi) Form2 (child of mdi) Form3 (child
I have a three-tier Windows Forms DB application in VB.NET. I'm using VS 2005.
I am trying to display three forms in one template. I have the forms
I have three pages that has forms on them. They all lead to one
I have three Tabs in my Windows Forms form. Depending on the selected RadioButton
I have several dynamically created links and forms on one page named with IDs
I have a table showing information from a mysql table. I have three forms
I have two forms. In a primary form I have a button wich calls
I have two forms named 'mainForm' and 'addRslt'. The idea is when users click
I have three tables named Item, Event, and Seat, constructed like this: Item Id

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.