I have created 2 forms in Winforms. I have button in Form1 and some text in form2. When the button in the form is clicked, I made to show the form2 by click event. When i close the form2 the form1 also getting closed.
But i want the form1 not to be closed.
Form1 Code :
public Form1()
{
InitializeComponent();
button1.Click += Button1_Click;
}
private void Button1_Click(object sender, EventArgs e)
{
var form = new Form2();
form.Show();
}
Form2 :
Simply displaying the details like name and city details.
I just created simple sample, Since am in starting stage.
Please share your ideas and thoughts.