I’m trying to close my main form if the user clicks on the exit button on license form or close it.
I try this code on exit button but didn’t work:
//——————————————————————–
private void button2_Click(object sender, EventArgs e)
{
Form1 aa=new Form1();
aa.Close();
this.Close();
}
//——————————————————————–
I’ll be thankful if somebody can help me!
If that Parent form is the Main form in your application then you can use
To know more go here.