Killing another application running in Windows from a PB App

Killing another application running in Windows from a PB App

Post by nobod » Sun, 12 Nov 1995 04:00:00



Just a quick question... I can launch an external program from PowerBuilder by
using the RUN("command_line",window_state) command.

Does anyone know how to terminate a program which has been launched this way??

There must be an equivalent to the Windows Task Manager "terminate" function.
 If I could somehow find the handle to the other applications window I could
probably kill it by doing a CloseWindow passing that handle...any takers on
this question...

Bill McMaster

 
 
 

Killing another application running in Windows from a PB App

Post by Joseph B. Pettinicch » Tue, 14 Nov 1995 04:00:00


One way to do this is to use the Windows API FindWindow call
to access the application's main window.  FindWindow returns
a window handle given an application class name, window title,
etc..  Once you have the handle, send it a WM_CLOSE message
(WordParm=0; LongParm=0) using the Send PowerScript function.

Sorry I don't know the message number for WM_CLOSE.  You can
find it in any copy of Windows.h/Win16.h.

---------------
Joe Pettinicchi
CPD Associate

 
 
 

1. Killing another windows application from with a PB app

Just a quick question... I can launch an external program from
PowerBuilder by
using the RUN("command_line",window_state) command.

Does anyone know how to terminate a program which has been launched
this way??

There must be an equivalent to the Windows Task Manager "terminate"
function.
 If I could somehow find the handle to the other applications window I
could
probably kill it by doing a CloseWindow passing that handle...any
takers on
this question...

Bill McMaster

2. Matlab C++ Math Library Bugs?

3. Sharing MDI Windows between PB and non-PB apps.

4. dynamic value like excel

5. Does PB 3 or PB 4 needs MS Windows extended version to run?

6. Easy Question?

7. VO App as a Window Service - App still running

8. Help, on start-up error message.

9. Turning Windows apps into browser pug-ins

10. Killing another Windows app from Excel V 5

11. Help: running multiple PB apps

12. Out of Memory in Win31 when running my PB app

13. How Distinguish If Running 16-bit or 32-bit PB App?