Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shutting down an App

Status
Not open for further replies.

marieva1

Programmer
Jun 15, 2000
3
US
Hi there,

Could someone tell me how to shutdown a window application by name using Visual Basic?

Thanks in advance.
 
Use AppActivate to set focus to the window, then use sendkeys to send ALT F4, or use the FindWindow() API call to get the window handle, then SendMessage to send a WM_CLOSE message to that window. [sig]<p>nick bulka<br><a href=mailto: > </a><br><a href= </a><br>Get your technical books at Bulka's Books<br>
[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top