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

Kill process while save or save as

P: 6
Hi,

I am working in an application (VB 2005) that has a listview of all running processes and hastheability to close (kill) any active process.
So far, I have been able to kill any process at will that do not requiere further intervention such as iexploere single tabbed and any application that does not requiere "save or save as" using:

For Each instance In myProcess
Next
instance.CloseMainWindow()

My question is, is there any posible way to either bypass the "save" , "save as" or "'cancel" dialog window as well as close all tabs in ieplorer and Firefox or especified to save or save as the file to a temp folder?

An example, when closing up notepad after a new document has been initiated, when trying to close it by the above method will prompt me with this scenario.

Any assistance will be greatly appreciated

Thanks
Eddie
Mar 27 '07 #1
Share this Question
Share on Google+
2 Replies


P: 67
Hi,

I am working in an application (VB 2005) that has a listview of all running processes and hastheability to close (kill) any active process.
So far, I have been able to kill any process at will that do not requiere further intervention such as iexploere single tabbed and any application that does not requiere "save or save as" using:

For Each instance In myProcess
Next
instance.CloseMainWindow()

My question is, is there any posible way to either bypass the "save" , "save as" or "'cancel" dialog window as well as close all tabs in ieplorer and Firefox or especified to save or save as the file to a temp folder?

An example, when closing up notepad after a new document has been initiated, when trying to close it by the above method will prompt me with this scenario.

Any assistance will be greatly appreciated

Thanks
Eddie
Why don't you try Kill() method instead of CloseMainWindow()
That is in your case.

Expand|Select|Wrap|Line Numbers
  1. instance.Kill();
Mar 28 '07 #2

P: 6
You are right, thanks for the reply. I could have swear I tried that before and did not work.
Newbie honest mistake!

Thanks again,
Eddie
Mar 29 '07 #3

Post your reply

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