• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Determining the positions of the windows shown on screen  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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


 
permaculture is largely about replacing oil with people. And one tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!