![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Dec 2004
Posts: 2
Rep Power: 0
![]() |
Exit Code
I have created a small program, and ish to have an 'Exit' button on there to close the program. What code do I need to use here to close the program?
Thanks |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
I believe it's Application.Quit(); .
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Mar 2005
Posts: 6
Rep Power: 0
![]() |
This may work for you::
try going to the form, and double click the button you wish to designate as the exit button. When you are given the code for the click event of that button, enter the following code:
[code] private void button2_Click(object sender, System.EventArgs e) { Application.Exit(); } [\code] all you must enter is the Application.Exit(); inside the brackets. Good Luck! --BRad |
|
|
|
|
|
#4 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Quit; Exit... same thing...
|
|
|
|
|
|
#5 |
|
Newbie
Join Date: Mar 2005
Posts: 6
Rep Power: 0
![]() |
true. true.
![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|