|
-
May 20th, 2003, 07:37 PM
#1
Thread Starter
Lively Member
How I close my appication?
I want to close my application from one button, does any one knows how to do it??
like in visual basei you use
thanks
Last edited by angel of dark; May 20th, 2003 at 11:35 PM.
al peor programador hasta el HELLO WORLD le marca error.....
event to the worst programmer the Hello world marks him error..
-
May 20th, 2003, 08:32 PM
#2
Frenzied Member
-
May 20th, 2003, 09:07 PM
#3
Thread Starter
Lively Member
It doesn´t works I wrote Application.Close(); also I try with the name of the name of the application in this case is "Sale" so I wrote Sale.Close(); and It didn´t works either, could you help me??, or maybe you know a way to reload an application.
Cheers
al peor programador hasta el HELLO WORLD le marca error.....
event to the worst programmer the Hello world marks him error..
-
May 21st, 2003, 06:31 AM
#4
Frenzied Member
-
May 21st, 2003, 09:55 AM
#5
Sleep mode
Originally posted by angel of dark
It doesn´t works I wrote Application.Close(); also I try with the name of the name of the application in this case is "Sale" so I wrote Sale.Close(); and It didn´t works either, could you help me??, or maybe you know a way to reload an application.
Cheers
What do you mean it didn't work ? the code DevGrp posted should work regardless of where it is used (startup form or nested form)
-
May 22nd, 2003, 01:16 AM
#6
Frenzied Member
angel of dark: You don't need to use the name of the application. Just use "Application.Close();" No matter the name. "Sale.Close()" will never work.
We miss you, friend...  Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico
-
May 22nd, 2003, 12:09 PM
#7
Sleep mode
Originally posted by Tec-Nico
"Sale.Close()" will never work.
This will work if "Sale" is the startup form of the project .
-
May 22nd, 2003, 02:29 PM
#8
Frenzied Member
True, but I know the case, and "Sale" is the name of the project, not the name of the startup form, Pirate.
We miss you, friend...  Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico
-
May 24th, 2003, 12:06 PM
#9
Frenzied Member
"Application.Close()" won't work on other forms... But I found out that "Application.Exit()" does.
So I wrote on the Closed event "Application.Exit()" and it forces the End of your application like "End" of Visual Basic.
Example:
private void frmLogin_Closed(object sender, System.EventArgs e)
{
Application.Exit();
}
We miss you, friend...  Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico
-
May 29th, 2006, 06:20 PM
#10
Addicted Member
Re: How I close my appication?
Application.Exit() will close your application, but if you have any running threads they will continue to run, this doesn't take care about threads. But that's true in VB too...
Hope this helps.
-
May 30th, 2006, 09:27 PM
#11
PowerPoster
Re: How I close my appication?
Application.Close closes the application but still runs in the background
Application.Exit closes and exits the application....I am sure that if there are threads still running then a threadAbortException will be thrown which you would have to handle....
-
May 31st, 2006, 01:28 AM
#12
Addicted Member
Re: How I close my appication?
 Originally Posted by Techno
Application.Exit closes and exits the application....I am sure that if there are threads still running then a threadAbortException will be thrown which you would have to handle....
I am sure if there are threads still running they will continue to run if you don't stop them programatically.
-
May 31st, 2006, 01:34 AM
#13
Re: How I close my appication?
 Originally Posted by zahadumy
Application.Exit() will close your application, but if you have any running threads they will continue to run, this doesn't take care about threads. But that's true in VB too...
Hope this helps.
Did you look at the last post date in this thread before posting?
-
May 31st, 2006, 04:46 AM
#14
Addicted Member
Re: How I close my appication?
05-24-2003
Oops... I just saw 05.24, which would be like a week ago in this year, I didn't look at the year. Anyway, I thought I found this thread on the first page, probably I was searching for something else and found it. Sorry.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|