• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Determining the positions of the windows shown on screen

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I need to determine the positions and dimensions of all the windows on screen for use with my javafx app.
I've been using JNA to do this, and it works fine on my pc.

However on another pc, 3 programs show up in task manager under processes as "Background Processes", namely "Photos", "Movies & TV", "Settings".
The problem is that JNA tells me these have windows on screen,  eg, "Photos" -> (500,154)(1172,694), the coordinates being the top left, and bottom right of the app.
But there is visually no window on screen for those 3 apps,  as they are background processes.
So these 'ghost' windows that aren't really there give me undesirable results.


I can use:

To get a list of the processes, but don't know how to determine which are in the background or not, and also the process "Cortana" shows as "SearchUI.exe", when I run the code above.
So it doesn't match the window name given by the JNA code.

If anyone has any ideas or experience with this, please let me know.
Thanks


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic