PC Review


Reply
Thread Tools Rate Thread

Application.Exit();

 
 
Yasin cepeci
Guest
Posts: n/a
 
      3rd May 2007
I want to close my application when the user submit cancal button on a
messagebox and go on if user submit ok button on a messagebox?
I couldnt find where is the triggers of messagebox?


 
Reply With Quote
 
 
 
 
Alberto Poblacion
Guest
Posts: n/a
 
      3rd May 2007
"Yasin cepeci" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I want to close my application when the user submit cancal button on a
>messagebox and go on if user submit ok button on a messagebox?
> I couldnt find where is the triggers of messagebox?


You invoke the MessageBox and then check the result:

DialogResult result = MessageBox.Show(....);
if (result==DialogResult.Cancel)
{
Application.Exit();
}
else
{
....
}


 
Reply With Quote
 
Yasin cepeci
Guest
Posts: n/a
 
      3rd May 2007
It works thanks
"Alberto Poblacion" <earthling-(E-Mail Removed)>, haber
iletisinde sunlari yazdi:(E-Mail Removed)...
> "Yasin cepeci" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>I want to close my application when the user submit cancal button on a
>>messagebox and go on if user submit ok button on a messagebox?
>> I couldnt find where is the triggers of messagebox?

>
> You invoke the MessageBox and then check the result:
>
> DialogResult result = MessageBox.Show(....);
> if (result==DialogResult.Cancel)
> {
> Application.Exit();
> }
> else
> {
> ....
> }
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.Exit() vs Environmrnt.Exit(0) =?Utf-8?B?VGFvZ2U=?= Microsoft C# .NET 1 19th Apr 2007 03:37 AM
application.exit, application.exitthread exit application problem =?Utf-8?B?TWlrZSBTaWx2ZXI=?= Microsoft Dot NET Framework Forms 2 24th Nov 2004 03:14 AM
Application.exit() vs Environment.exit(-1) vs Application.exitthread() Brendan Miller Microsoft C# .NET 1 5th Feb 2004 08:13 AM
RE: How can I safe exit my application when the user terminates the application from the Control panel? Dolphin White Microsoft Dot NET Compact Framework 3 6th Sep 2003 01:12 AM
RE: RE: How can I safe exit my application when the user terminates the application from the Control panel? Dolphin White Microsoft Dot NET Compact Framework 0 4th Sep 2003 04:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:29 PM.