DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 9 of 9

Thread: Kill an instance an app

  1. #1
    Urs K Guest

    Kill an instance an app


    I have two apps. app#1 and app#2
    Okay and I want app#1 kill app#2!
    How can I do this?

    Thx Urs

  2. #2
    John K. Guest

    Re: Kill an instance an app

    Sendmessage WM_CLOSE 'I THINK that should work.

    "Urs K" <uk@websting.de> wrote in message news:3956168d$1@news.devx.com...
    >
    > I have two apps. app#1 and app#2
    > Okay and I want app#1 kill app#2!
    > How can I do this?
    >
    > Thx Urs




  3. #3
    Urs Guest

    Re: Kill an instance an app


    >Sendmessage WM_CLOSE 'I THINK that should work.


    But how do I get the handle to the app? Perhaps I should say that
    my app doesnt have a form!

  4. #4
    John K. Guest

    Re: Kill an instance an app

    *G* I dont know

    "Urs" <uk@websting.de> wrote in message news:39563bce$1@news.devx.com...
    >
    > >Sendmessage WM_CLOSE 'I THINK that should work.

    >
    > But how do I get the handle to the app? Perhaps I should say that
    > my app doesnt have a form!




  5. #5
    Albert Beevendorp Guest

    Re: Kill an instance an app

    If you post this to vb.api, you will get a solution there.


    Regards,

    Albert

    Urs K <uk@websting.de> schreef in berichtnieuws 3956168d$1@news.devx.com...
    >
    > I have two apps. app#1 and app#2
    > Okay and I want app#1 kill app#2!
    > How can I do this?
    >
    > Thx Urs




  6. #6
    Paul Clement Guest

    Re: Kill an instance an app

    On 25 Jun 2000 07:26:21 -0700, "Urs K" <uk@websting.de> wrote:


    I have two apps. app#1 and app#2
    Okay and I want app#1 kill app#2!
    How can I do this?

    See the following:

    HOWTO: Programmatically Close a Separate Application
    http://support.microsoft.com/support.../Q176/3/91.ASP


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

  7. #7
    Karl E. Peterson Guest

    Re: Kill an instance an app

    Hi Paul / Urs --

    > I have two apps. app#1 and app#2
    > Okay and I want app#1 kill app#2!
    > How can I do this?
    >
    > See the following:
    >
    > HOWTO: Programmatically Close a Separate Application
    > http://support.microsoft.com/support.../Q176/3/91.ASP


    Just an FYI -- that's a really *lame* KB. Notice that they're using an hWnd as a
    waitable object? I'm really amazed that one got published.

    Later... Karl
    --
    http://www.mvps.org/vb






  8. #8
    Paul Clement Guest

    Re: Kill an instance an app

    On Tue, 27 Jun 2000 11:52:16 -0700, "Karl E. Peterson" <karl@mvps.org> wrote:


    > HOWTO: Programmatically Close a Separate Application
    > http://support.microsoft.com/support.../Q176/3/91.ASP

    Just an FYI -- that's a really *lame* KB. Notice that they're using an hWnd as a
    waitable object? I'm really amazed that one got published.

    Hi Karl,

    Amazed? Really? ;-)

    Yeah, I have to admit I didn't notice what they were using in the call to WaitForSingleObject. Using
    the process ID instead of the window handle is more reliable?


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

  9. #9
    Karl E. Peterson Guest

    Re: Kill an instance an app

    Hi Paul --

    > > HOWTO: Programmatically Close a Separate Application
    > > http://support.microsoft.com/support.../Q176/3/91.ASP
    >
    > Just an FYI -- that's a really *lame* KB. Notice that they're using an hWnd as a
    > waitable object? I'm really amazed that one got published.
    >
    > Hi Karl,
    >
    > Amazed? Really? ;-)


    Heh, and I think I know just who to go beat-up on this one. <bg>

    > Yeah, I have to admit I didn't notice what they were using in the call to
    > WaitForSingleObject. Using
    > the process ID instead of the window handle is more reliable?


    Ummm, well, a process *handle* might work, yeah. Of course, you'd need the PID to
    obtain the handle, eh? <g>

    hProcess = OpenProcess(fdwAccess, False, ProcessID)
    nRet = WaitForSingleObject(hProcess, CLng(TimeOut))

    Later... Karl



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center