I want my Java program to know when a particular program has its window maximized or minimized or may be is running in exclusive full screen mode(most importantly when not). How to go about it? If its not possible than only if i know that if any program is running in full screen exclusive mode or not!
Asked
Active
Viewed 473 times
2 Answers
2
-
I guess that would be to get notification of the program window itself. But i want it to know for a window of some other program that is not linked to "my Java program" in any way. – ashish.g Feb 05 '11 at 19:35
-
If it's "not linked in any way", how do you expect it to notify you about anything? "I want no connection whatsoever, but I still want to know" - contradictory requirements, in my opinion. – duffymo Feb 05 '11 at 19:38
-
i meant by "not linked" like not sharing any code. ok if its kinda not possible...would it be possible to know that if SOME program is running (or not running) in full screen exclusive mode. – ashish.g Feb 05 '11 at 19:44
-
The only way I can thinking of would be to write a web service that could accept event notifications from other applications like your "some other problem". It would have to know about the URL of the web service, how to connect, how to create an appropriate request, etc., but it need not share any other code. – duffymo Feb 05 '11 at 20:30
1
i know its a little late to answer this but have a look at this In Java Swing how do you get a Win32 window handle (hwnd) reference to a window? once you have the window handle/reference you can perform operations on the window. Its definitely possible to do this since Spy++ that comes along with Visual Studio does this.