Kill process while save or save as

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eddie69
    New Member
    • Mar 2007
    • 6

    Kill process while save or save as

    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.CloseM ainWindow()

    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
  • channaJ
    New Member
    • Mar 2007
    • 67

    #2
    Originally posted by eddie69
    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.CloseM ainWindow()

    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.

    Code:
    instance.Kill();

    Comment

    • eddie69
      New Member
      • Mar 2007
      • 6

      #3
      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

      Comment

      Working...