Control Windows Applications Usage

Hello,I want to know if there is any way that i can know in java when a windows application is launched and when it is closed.Thanks in AdvanceJuan Sebasti醤 Escobar C.
[195 byte] By [escobar5a] at [2007-11-26 15:33:10]
# 1

Implement java.awt.event.WindowListener. There are two methods in there that will be alerted when a window opens or closes. Then call addWindowListener() on your Frame object and pass the WindowListener object as an argument.

The two methods are:

public void windowOpened(WindowEvent e);

public void windowClosing(WindowEvent e);

Message was edited by:

Lord_Jirachi

Lord_Jirachia at 2007-7-8 21:50:17 > top of Java-index,Desktop,Developing for the Desktop...
# 2
Use JNI.
es5f2000a at 2007-7-8 21:50:17 > top of Java-index,Desktop,Developing for the Desktop...
# 3

> Hello,

>

> I want to know if there is any way that i can know in

> java when a windows application is launched and when

> it is closed.

>

> Thanks in Advance

>

> Juan Sebasti醤 Escobar C.

If you are launching the application from java using a Process object then all you need to do is listen on that process. I did have some code once upon a time that did just that - but unfortunatly I lost it.

Rich@HCCa at 2007-7-8 21:50:17 > top of Java-index,Desktop,Developing for the Desktop...