!!! Close all running apps when you don't know (and can't get) the Captions??? 
Author Message
 !!! Close all running apps when you don't know (and can't get) the Captions???

Help!
  I'm working on a program that allows you to launch multiple programs from
a VB6 app. After a preset amount of time, my app is supposed to *forcably*
close all open programs and shut down.
  I have gotten this to work by using the GetWindow API to determining the
captions of all windows.

BUT this method ASSUMES that your VB program is the *first* app in order to
track-down the captions of every app (using your forms.hWnd as a starting
point), and sometimes programs{*filter*}around with the Z-Order, so I am unable
to accurately collect ALL of the window captions in order to close them.

I have successfully implemented the "CreateToolhelpSnapshot" API method to get
the names of every EXE that is running, but I don't know how to close a
program knowing only its "filename.EXE".


TIA             -*- Tom -*-



Fri, 22 Oct 2004 11:00:41 GMT  
 !!! Close all running apps when you don't know (and can't get) the Captions???
Please try API EnumWindows, that function enumerates all top-level windows
on the screen by passing the handle to each window, in turn, to an
application-defined callback function.  You can then post a WM_CLOSE
message to those windows.

Regards,
Gang
This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net?  http://www.gotdotnet.com



Sat, 23 Oct 2004 15:05:51 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Migrating Databases: Don't Know Path Until Run Time

2. Apps don't run on all systems

3. Help-don't know what i'm missing

4. Don't know if i'm in the right newsgroup

5. Closing an DataReport (Designer), don't closes

6. 'Canned' data in VB program

7. VB can't run non-Microsoft OCX when user don't login as Adminsitrator

8. Don't Know How to Publicly Declare Variable

9. Microsoft Windows 95 don't know calculation

10. Migration to VS 2003 worked though I don't know why

11. Don't tell me no one knows the answer

12. does anybody know why this code don't work

 

 
Powered by phpBB® Forum Software