Solved

Notify if any other windiw is open!

Posted on 2004-10-01
6
237 Views
Last Modified: 2010-05-19
My problem is:
I have java swing program which is full screen size. My question is how i notify if any other program open window in a background of my program?
thank you
0
Comment
Question by:grajzl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 35

Accepted Solution

by:
girionis earned 63 total points
ID: 12198227
I am afraid you will need to use JNI for this.
0
 
LVL 35

Expert Comment

by:girionis
ID: 12198228
0
 
LVL 92

Expert Comment

by:objects
ID: 12198229
you cant (without using JNI)
0
 
LVL 18

Assisted Solution

by:armoghan
armoghan earned 62 total points
ID: 12198447
You have to use JNI for sure..
How let me give you a hint
if you are talking about windows os

Use SetWindowsHookEx to create a hook for WH_SHELL.
In your ShellProc handle HSHELL_WINDOWCREATED.
After you've launched your app, start waiting.
For each new window created, your ShellProc will be called.
For each window call GetWindowThreadProcessId(hWnd, &dwProcessID);
Compare the dwProcessID of the newly created window with the processid you got from CreateProces.
If those two processids are not equal you've found the window for the new application .

Hope it helps ;)
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question