Solved

Notify if any other windiw is open!

Posted on 2004-10-01
6
220 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
  • 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Weekend adv creator 3 52
fibonacci ten numbers 4 45
tomcat startup error 5 104
Delphi Firemonkey: if the Sms contain special characters it won't send it 3 44
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

828 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