Ending a Process VB4a 32 Bit 
Author Message
 Ending a Process VB4a 32 Bit

I am trying to end a range of processes (all are consoles running
batch files) from VB4, 32 bit, and can't seem to get it to work

The code I am using is as follows:

Public Function Remove_All_Processes()
    Main.MonitorTimer.Interval = 0
    Main.MonitorTimer.Enabled = False

    Dim hwnd As Long
    hwnd = FindWindow("ConsoleWindowClass", 0&)
    While hwnd <> 0
        SendMessage hwnd, WM_SYSCOMMAND, 0 + SC_CLOSE, 0&
        hwnd = FindWindow("ConsoleWindowClass", 0&)
End Function

This works on other types of processes, but won't work on Console

Can anyone help out here please?


Sun, 07 Mar 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. How a 32-Bit App Can Determine When a Shelled Process Ends, Article ID: Q129796

2. How a 32-Bit App Can Determine When a Shelled Process Ends

3. How a 32-Bit APP can Determine When a Shelled Process Ends - Q129796

4. Help: How a 32-Bit app can determine when a shelled process ends

5. Open ended query system using SQL in VB4 32-bit

6. How to create 32-bit DLL in Watcom C and call from 32-bit VB

7. TIME TO WIN 32-Bit DLL for VB 4.0 32-Bit or Higher (VB5)

8. TIME TO WIN 32-Bit (v4.04) (+750 functions) for VB 4.0 32-Bit

9. Calling a user-written 32-bit dll from 32-bit vb 4.0

10. Calling 32-bit DLL function from 32-bit VB4 app

11. VB4a/32: Problem displaying hourglass on ListView Column Sort

12. Waiting for a shell process to finish in 32 bit environment


Powered by phpBB® Forum Software