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 / July 2006

Tip: Looking for answers? Try searching our database.

Detecting application close

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Neven Klofutar - 11 Jul 2006 10:44 GMT
hi,

A friend is configuring windows in a way that he's not using explorer shell,
he's using something else (I hope I wrot this corectlly :) ).
Now ... when shell is closed he want's to close windows down.

Is it possible to create windows service that can "listen" when will an
application (shell) close and then start windows shutdown ? (windows
shutdown is rather trivial, I'm more conserned about first part of the
problem).

I hope you'll understard this :)

thanx, Neven
Roger - 11 Jul 2006 19:38 GMT
> Is it possible to create windows service that can "listen" when will an
> application (shell) close and then start windows shutdown ? (windows
> shutdown is rather trivial, I'm more conserned about first part of the
> problem).

Have a look at System.Diagnostics.Process
It has an Exited event which is fired whenever the associated process
terminates.  You could look up the process for your shell object and
then just handled the Exited event.

I'm not aware of any reason why this wouldn't work within a windows
service.

- Roger
Neven Klofutar - 12 Jul 2006 10:55 GMT
Thanx, I solved it with Windows Service and using timer.

Process.GetProcessesByName(sProcesName)

Neven

>> Is it possible to create windows service that can "listen" when will an
>> application (shell) close and then start windows shutdown ? (windows
[quoted text clipped - 10 lines]
>
> - Roger

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.