PC Review


Reply
Thread Tools Rate Thread

Application.Exit VS Me.Close()

 
 
Ivan Weiss
Guest
Posts: n/a
 
      11th Dec 2003
I am wondering what the differences are between using the
Application.Exit() and Me.Close() (Me.Close on the main mdiForm in my
app) to close and exit my application.

Are there benefits to using either or...

Also, the standard three windows buttons on the top right (minimize,
restore/maximize, and close). My close button is not working in my app.
Does anyone know how to code this? I thought this was automatically
controlled by the designer when you create a form.

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      11th Dec 2003
* Ivan Weiss <(E-Mail Removed)> scripsit:
> I am wondering what the differences are between using the
> Application.Exit() and Me.Close() (Me.Close on the main mdiForm in my
> app) to close and exit my application.
>
> Are there benefits to using either or...


IMO it's preferred to use the 'Close' method. Have a look at the
documentation for 'Application.Exit' to find out why it is not suitable
in most cases,

> Also, the standard three windows buttons on the top right (minimize,
> restore/maximize, and close). My close button is not working in my app.
> Does anyone know how to code this? I thought this was automatically
> controlled by the designer when you create a form.


Maybe the famous "form close bug"?

C# code to repro the close bug:

<http://www.jelovic.com/binaries/WindowsFormsCloseBugDemo.zip>

Some information on the bug:

<http://makeashorterlink.com/?T2FC26194>

Fixed in .NET 1.1.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
 
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
Application.exit() / Form.Close() Hans Microsoft Dot NET Framework Forms 2 21st Oct 2003 12:11 PM
Close or Exit application Jeff Microsoft Excel Programming 3 8th Sep 2003 05:18 PM


Features
 

Advertising
 

Newsgroups
 


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