5
Answers

How do I Close a form?

John  Burns

John Burns

14y
8.1k
1

Hi again guys.
I have added a menu strip to my app and have a simple "File" menu however; in that file menu u have a Close option like you normally would but what is the code so that when i click close it closes the program?
In VB it was Me.Close (where Me refered to the form)
 
Thanks
Answers (5)
0
Subhendu De

Subhendu De

NA 3.1k 449.4k 14y
this.Close();
Accepted
0
Satyapriya Nayak

Satyapriya Nayak

NA 39.3k 13.3m 14y
In vb

Me.close
End
Application.exit


In C#

this.Close();
Application.Exit();

0
Crish

Crish

NA 2.4k 92.5k 14y
Hi

To close your form just write this below code.

form1.Close()

otherwise....

me.close()
0
Suthish Nair

Suthish Nair

NA 30.5k 7.2m 14y

You talking about Windows or web application.

Because MenuStrip is an Windows control.
0
John  Burns

John Burns

NA 120 110.1k 14y

thanks again