Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / April 2005

Tip: Looking for answers? Try searching our database.

What's the main difference between Application.Exit() and Application.ExitThread()?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stan - 25 Apr 2005 11:53 GMT
Hi

Can anyone tell me the difference between ¡yApplication.Exit()¡z and
¡yApplication.ExitThread()¡z?

I'm confused by the MSDN's explanation....

I'v try some codings but find nothing different between two of them!

Can someone give me explames?

Thanks!
Stoitcho Goutsev \(100\) [C# MVP] - 30 Apr 2005 02:25 GMT
Hi Stan,

One process can run more than one UI threads (threads that have message
pump); you can think of it like more then one main form (application)
running in the same process. Even though this is not very common it is
possible and completely OK.

Calling Application exit will cause all such UI threads to end (all
sub-application will end) and the process most likely will be removed from
the memory.

Calling Application.ExitThread will exit only the sub-application that calls
the method. The rest will stay alive.

For application with only one UI thread both methods are equivalent; that's
why probably you don't see the difference.

Signature

Stoitcho Goutsev (100) [C# MVP]

> Hi
>
[quoted text clipped - 8 lines]
>
> Thanks!

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.