Questions tagged [active-window]

The window in front of all other open windows, on a graphical user interface. For example, the Internet browser window you are using to read this web page is considered the active program or active window.

The window in front of all other open windows, on a graphical user interface. For example, the Internet browser window you are using to read this web page is considered the active program or active window.

53 questions
205
votes
13 answers

Capture screenshot of active window?

I am making a screen capturing application and everything is going fine. All I need to do is capture the active window and take a screenshot of this active window. Does anyone know how I can do this?
user
  • 16,429
  • 28
  • 80
  • 97
47
votes
3 answers

Show window in Qt without stealing focus

I'm using the Qt library to show a slideshow on the second monitor when the user isn't using the second monitor. An example is the user playing a game in the first monitor and showing the slideshow in the second monitor. The problem is that when I…
dutchmega
  • 1,384
  • 2
  • 12
  • 16
47
votes
12 answers

Obtain Active window using Python

I would like to get the active window on the screen using python. For example, the management interface of the router where you enter the username and password as admin That admin interface is what I want to capture using python to automate the…
Vinod K
  • 1,885
  • 11
  • 35
  • 45
12
votes
6 answers

Get current active window's title in Java

I am trying to write a Java program that logs what application I'm using every 5 seconds (this is a time tracker app). I need some way to find out what the current active window is. I found KeyboardFocusManager.getGlobalActiveWindow() but I can't…
Steven
8
votes
1 answer

How to monitor the active window on a remote PC

I'm able to view the processes taking place on a remote computer on my network by using the wmi module. This is an example using wmi to monitor the processes created and deleted on my own PC. import wmi, multiprocessing def create(): while…
Phoenix
  • 4,386
  • 10
  • 40
  • 55
6
votes
2 answers

How to get active window app name as shown in task manager

I am trying to get the active window's name as shown in the task manager app list (using c#). I had the same issue as described here. I tried to do as they described but I have issue while the focused application is the picture library I get…
eskadi
  • 245
  • 3
  • 17
5
votes
2 answers

Retrieving active window from Mutter on Gnome/Wayland session

I'm trying to write an application that sends different dBus signals to different applications depending on what application is active. The idea is to pair it with Libinput-gestures, and allow per application gesture response. Problem is, it's…
4
votes
1 answer

How do I check if a certain process has focus?

I'm trying to check if javaw.exe has focus, then execute certain code if it does. Previously I had code which would look for the process ID of javaw.exe, then compare it to the process which currently had focus, which worked for awhile, but then I…
User5152
  • 131
  • 9
4
votes
4 answers

Setting zoom without select in Excel VBA

Is it possible to set up zoom level based on screen resolution without Select? I have followed the code: Sheets(1).Range("A1:AC1").Select ActiveWindow.Zoom = True taken from https://stackoverflow.com/a/19439177/1903793 Desired code would be…
Przemyslaw Remin
  • 6,276
  • 25
  • 113
  • 191
3
votes
3 answers

Determine Whether Program is the Active Window in .NET

I have a C#/.NET app and I want to implement the following behavior: I have a popup menu. Whenever the user clicks on anything within the application that is not the popup menu, I want the popup menu to close. However, whenever a user is not in the…
Cory
  • 22,772
  • 19
  • 94
  • 91
3
votes
2 answers

How can I determine if the OpenGL window is the active window?

How can I determine if the OpenGL window is the active window?
Datoxalas
  • 1,261
  • 5
  • 14
  • 23
2
votes
1 answer

WebBrowser control on tab making main window inactive

I've got a Visual Studio 2008 .NET 2.0 WinForms app that contains a WebBrowser control on one of the TabPages of its main TabControl. This WebBrowser is only used to display a PDF file that's distributed with the application, and there are no other…
Jeff Elliott
  • 113
  • 8
2
votes
1 answer

python why win32process.GetWindowThreadProcessId() PID returns a list

I try to find the path to executable of the current active window in python. I am not familiar with system variables and did not know what i should do and i found a few solutions and practicing with them . First i try to get current active window…
user7685914
  • 83
  • 1
  • 9
2
votes
1 answer

Send Keys & AppActivate

Method: I'm using a combination of SendKeys & Virtual Keyboard to send key strokes to a core administration system that is stored on Citrix as an application. The VBA code is identifying the application by using the AppActivate &…
Steven
  • 139
  • 1
  • 11
2
votes
1 answer

Do relative coordinates for a window change depending on the resolution?

My colleagues seem to have a lot of trouble using my AHK scripts and it sounds like the MouseClicks are not clicking the right positions within the active windows. Both parties here are using Windows 7. Their resolution is 1600 x 900 where as I'm…
1
2 3 4