By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,067 Members | 1,818 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,067 IT Pros & Developers. It's quick & easy.

Handling Application Exit Event

P: 1
Hi buddy,

I am having Sub Main (in module and it is start up object/form), which executes certain processes (exe). And after that I execute Application.Run() method which will keep my application in running mode. (For few timers are there which should keep running)

Now I when my application (Sub Main's Application) gets terminated I want to kill all processes. I have stored process objects in List(Of Process) collection.

Where should I write codes for killing processes.

Means is there any event handler for Application exit event?

Help me out.

Thank you


Ok I found solution its
AddHandler Application.ThreadExit, AddressOf ApplicationExit
AddHandler Application.ApplicationExit, AddressOf ApplicationExit
Jan 9 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.