Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Aug 6, 1997

Programmatically Close Another Program

To have a program programmatically close another program, use this code:
 ' Close an existing program

	Title = "VBApp"
	ihWnd = FindWindow(0&, Title)
	ihTask = GetWindowTask(ihWnd)
	iRet = PostAppMessage(ihTask, WM_QUIT, 0, 0&)
	MsgBox "Check it out! The VB App should be history"
Douglas Haynes
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date