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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:32:29+00:00 2026-05-21T15:32:29+00:00

I have Form1 and Form2 in my project. Form2 is just a form with

  • 0

I have Form1 and Form2 in my project. Form2 is just a form with settings for Form1. What is the command to open the Form2 from the Form1 and also what’s the command to close it please?

  • 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-21T15:32:30+00:00Added an answer on May 21, 2026 at 3:32 pm

    You need to handle an event on Form1 that is raised as a result of user interaction. For example, if you have a “Settings” button that the user clicks in order to show the settings form (Form2), you should handle the Click event for that button:

    private void settingsButton_Click(Object sender, EventArgs e)
    {
        // Create a new instance of the Form2 class
        Form2 settingsForm = new Form2();
    
        // Show the settings form
        settingsForm.Show();
    }
    

    In addition to the Show method, you could also choose to use the ShowDialog method. The difference is that the latter shows the form as a modal dialog, meaning that the user cannot interact with the other forms in your application until they close the modal form. This is the same way that a message box works. The ShowDialog method also returns a value indicating how the form was closed.


    When the user closes the settings form (by clicking the “X” in the title bar, for example), Windows will automatically take care of closing it.

    If you want to close it yourself before the user asks to close it, you can call the form’s Close method:

    this.Close();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two forms in my project, form1 and form2. I have added a
I have 3 forms in my project form1 , form2 , form3 and it
I have a Windows Forms project in Visual Studio that reads configuration files from
I have a c# windows form project using watin. I would love to attach
I have a C# Windows Forms project open with some C# code in it.
In my ASP.NET Web-form Project I have an Event which Export Data ( List<Profit>
I'm developing a small POS for a university project. I have a form which
in my project i have one registration form which is developed in C#.net.to this
I'm working on a WindowsForm project and in my form I have a DataGridView
In my rails project I have a form to enter a dollar amount. This

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.