Close Application

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • PawelR

    Close Application

    Hello group,
    Sorry my English is very littel.
    I have question about close other application. For example in my application
    I have button btCloseWord to close MSWord. How write source code in C#

    if (btCloseButton. Click && Word.Open)
    Word.Close
    if (Word.Closed) MessageShow("Wo rd is closed")

    I want use this procedure for other application too.

    Thanks PawelR


  • Mohamoss

    #2
    RE: Close Application

    Hi PawelR
    You can use the Diagnostic and the threading namespaces. get a list of the
    running processes (you can loop on that ), then for example you would check
    on the name of the process that you want to close then you can use the
    kill method of the closeMainWindow method against that process . These are
    method provided by the process class.
    Check out these links

    frlrfsystemdiag nosticsprocessc lassclosemainwi ndowtopic.asp


    frlrfsystemdiag nosticsprocessc lassclosemainwi ndowtopic.asp
    Mohamed Mahfouz
    MEA Developer Support Center
    ITworx on behalf of Microsoft EMEA GTSC

    Comment

    Working...