Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

Detecting other open windows and their location

Thread view: 
Sean  Knapp - 24 Jun 2006 05:49 GMT
Hi all,

I assume this is possible, but have no idea where to start... what I
need to do is get a list of other windows that are open (i.e. firefox,
eclipse, itunes, etc) and ideally some additional information about
them such as location, window title, etc.

Any advice is very much appreciated.
Thanks,
Sean
Matt Humphrey - 24 Jun 2006 13:37 GMT
> Hi all,
>
> I assume this is possible, but have no idea where to start... what I
> need to do is get a list of other windows that are open (i.e. firefox,
> eclipse, itunes, etc) and ideally some additional information about
> them such as location, window title, etc.

There's nothing implicit in Java (especially because of platform
independence) for doing this.  This leaves you with 2 options: Find where
someone has written a JNI library to Windows for retrieving this information
or study Windows yourself and produce such a library.

One such library may be WinPack
http://www.jniwrapper.com/pages/winpack/overview
but you'll have to see for youself if it's as extensive as you need.  It
comes from JNIWrapper http://www.jniwrapper.com/pages/winpack/overview
A Java interface to Windows is likely to be large and complex, so you may
have to do some digging to to find a free version.  Try searching on (jni
"windows api")

If you have to do it yourself, you can get away without writing JNI directly
by using xFunction http://www.excelsior-usa.com/xfunction.html  or a system
like SWIG http://www.swig.org/Doc1.3/Java.html#n2

Cheers,
Matt Humphrey matth@ivizNOSPAM.com  http://www.iviz.com/
Kurt M Peters - 24 Jun 2006 19:39 GMT
Can't you just do a getBounds on the frame of interest to find out how big
and where the windows are?
Kurt

>> Hi all,
>>
[quoted text clipped - 22 lines]
> Cheers,
> Matt Humphrey matth@ivizNOSPAM.com  http://www.iviz.com/
Sean  Knapp - 24 Jun 2006 20:19 GMT
Hi Kurt,

Will that work? How do I get access to a frame object of another
program that I don't have control of?

Thanks,
Sean

> Can't you just do a getBounds on the frame of interest to find out how big
> and where the windows are?
[quoted text clipped - 26 lines]
> > Cheers,
> > Matt Humphrey matth@ivizNOSPAM.com  http://www.iviz.com/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.