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
2
votes
1 answer

Detect active window changed using C# with a console application

This question is very similar to this one (Detect active window changed using C# without polling), and the code on that accepted answer works fine with a Windows Forms Application, but no way with a Console Application. ¿How can I detect that active…
Gothem
  • 341
  • 2
  • 15
2
votes
1 answer

c# screenshot of active window but doesn't caputre the window

I'm creating an application in which I need to create a PDF file with the screenshot of the application. I found how to create the screenshot and how to put it in my file. All is working well in most situations. My problem comes when I use more…
Bruno
  • 21
  • 1
  • 6
1
vote
1 answer

How to be notified when Internet Explorer gets focus

I'm working on a project in which I want my program to be notified when Internet Explorer gets focus or when navigating through tabs. To be clearer when an instance of IE gets focus or the user selects another tab, I want my program to be…
Luke
  • 193
  • 2
  • 3
  • 12
1
vote
1 answer

Python check if current window is file explorer (windows)

I am using this code to obtain current window from typing import Optional from ctypes import wintypes, windll, create_unicode_buffer def getForegroundWindowTitle() -> Optional[str]: hWnd = windll.user32.GetForegroundWindow() length =…
Julkar9
  • 1,508
  • 1
  • 12
  • 24
1
vote
0 answers

How to send keystrokes as the last value using xdotool?

After searching online and on stackoverflow, I finally figured out how to inject keystrokes into an active window using the following command. xdotool windowactivate --sync key This works as expected. However, every keystroke is…
ThN
  • 3,235
  • 3
  • 57
  • 115
1
vote
0 answers

Sending keys fails - Window active

I am sending a keystroke (ctrl+c) to an active Windows using InputSimulator To achive this I minimize my own form and set the application i wish to send the key to the foreground using the WIN32 API and SetForegroundWindow. Now this all works on…
Johannes
  • 441
  • 5
  • 15
1
vote
1 answer

Find Width of Excel Scroll Bar

Activewindow.UsableWidth gives me the width of the screen with the Vertical Scroll Bar's width included. Is there a way I can calculate the width of the Scroll Bar? I measured it by having one shape be UsableWidth and the other shape be what I…
dabernet
  • 23
  • 5
1
vote
0 answers

Get active window c#

im trying to get the name of each window i click on. I have working code but its using system timers instead of timers on the form. i will post code so its eaiser to see what im doing wrong. its also not letting me refer back to my text box, i think…
Jason
  • 233
  • 4
  • 17
1
vote
1 answer

How to get the name of global active window using Java?

I am work an Desktop Application in which i need to save the name of corrently focused or active window name(mozilla firefox, or any other file name) in an text file currently I am using getActiveWindow() method of KeyboardFocusManager which give…
Shreeyansh Jain
  • 1,407
  • 15
  • 25
1
vote
2 answers

Delphi Active Window Screenshot

I am trying to add capture screenshot of active window using this code procedure ScreenShot(activeWindow: bool; destBitmap : TBitmap) ; var w,h : integer; DC : HDC; hWin : Cardinal; r : TRect; begin if activeWindow then …
dudey
  • 87
  • 5
  • 13
1
vote
3 answers

Excel VBA ActiveWindow.Visible hiding the wrong workbook

I want to open a workbook (WB1) and then as it's opened, another workbook (WB2) is opened. I want WB2 hidden. Private Sub Workbook_Open() Application.ScreenUpdating = False Workbooks.Open Filename:="C:\WB2.xlsm" ActiveWindow.Visible = False End…
Josh
  • 265
  • 6
  • 11
  • 20
1
vote
1 answer

How to get the name of an active window?

I've confronted with problem of getting active window's name. When I use this code: HWND currentWindowHWND = GetForegroundWindow(); char title[100]; GetWindowTextA(currentWindowHWND, title, 100); I get something like: "How to get active window's…
user1724893
1
vote
0 answers

Active window screenshot using javascript code?

I am trying to get a snapshot of desktop application(developed in html5+javascript) .I know in java I can take the screenshot of active window.But is there any way /scripts using which I can take active window screenshots?Suggest me the approach…
user1071096
  • 155
  • 1
  • 3
  • 14
0
votes
1 answer

Is there a cross-platform way of obtaining the title of the current window on display using Kotlin multiplatform?

For example the following code snippet does just that but only for Windows: import com.sun.jna.platform.win32.User32 import com.sun.jna.platform.win32.WinDef.HWND object ActiveWindowFinder { @JvmStatic fun main(args: Array) { …
0
votes
1 answer

Make Tkinter not beeing the "Active window" even though i click on it

I'm using Tkinter to create an overlay on top of every other windows. For now, if I click on my overlay, like an image or a button, it changes the active windows to Tkinter, obviously. What i want is to use my overlay but keeping my active…