Close an app from another app

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am finding the windows handle for an application using the FindWindow() call. I need to then close that application if it is running. Any suggestions on how I should do this? I tried to use the CloseHandle() call, but that doesn't seem to work. Maybe I am just doing something wrong, or maybe I need to use a different method. Can anyone help? Thanks
 
Hi Susan

You can send a message to the window using the WM_CLOSE message. Check the following links out which exactly does what you want

http://www.mangovision.com/vbapi/ref/w/wm_close.htm

Hope this helps

Regards
Madh

MVP | MCSD.NE

----- Susan wrote: ----

I am finding the windows handle for an application using the FindWindow() call. I need to then close that application if it is running. Any suggestions on how I should do this? I tried to use the CloseHandle() call, but that doesn't seem to work. Maybe I am just doing something wrong, or maybe I need to use a different method. Can anyone help? Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top