Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 15th, 2005, 6:31 AM   #1
a_long
Newbie
 
Join Date: Dec 2004
Posts: 2
Rep Power: 0 a_long is on a distinguished road
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
a_long is offline   Reply With Quote
Old Feb 15th, 2005, 7:47 AM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
I believe it's Application.Quit(); .
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Mar 8th, 2005, 7:31 PM   #3
brad.wolfe
Newbie
 
Join Date: Mar 2005
Posts: 6
Rep Power: 0 brad.wolfe is on a distinguished road
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
brad.wolfe is offline   Reply With Quote
Old Mar 9th, 2005, 4:12 PM   #4
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Quit; Exit... same thing...
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Mar 9th, 2005, 8:04 PM   #5
brad.wolfe
Newbie
 
Join Date: Mar 2005
Posts: 6
Rep Power: 0 brad.wolfe is on a distinguished road
true. true.
brad.wolfe is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:58 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC