Windows OS is full of windows, even objects inside windows as we know them are also windows. Each window has a handle that is a pointer to the memory in which information about the window is stored.
Questions tagged [window-handles]
252 questions
0
votes
2 answers
Coded UI Test - waiting for running application to finish during the test
I am trying to create test for my-app using coded ui test with visual studio ultimate 2012, in my-app i run another app ( cmd window is opened during "another app" running).
i want to wait until this "another app" finish running and then to check…

Shadi Serhan
- 309
- 3
- 9
0
votes
0 answers
How to get the window handle when starting the application pinned to taskbar in c#?
I am creating an application that turns off the computer display via program using the following code:
private const int WM_SYSCOMMAND = 0x0112;
private const int SC_MONITORPOWER = 0xF170;
[DllImport("user32.dll")]
private static extern int…

VJ_Koushik
- 53
- 7
0
votes
0 answers
Focus on lastordefault, but handle call open new window
I am writing unit test with c# and I want to focus last opened page in new window. But when I use this:
ReadOnlyCollection handles = wDriver.WindowHandles;
String myWindowHandle = handles.LastOrDefault();
Windows handle opens one more…

Vilius
- 91
- 1
- 3
- 9
0
votes
4 answers
Identify process/exe which was passed specific command line arguments
There are two exes/programs which perform tasks based on command line arguments, let's call it Profile. Users can run multiple instances of these exes with specific Profiles.
We have come to a situation that if one exe is running with a profile, the…

bjan
- 2,000
- 7
- 32
- 64
0
votes
1 answer
how to find tab order of any UI in a windows application
I want to be able to find out the tab order of any UI in 3rd party applications. Let's say in my application I have a window handle of a UI of some other application running on my system. I want to know the tab order of that UI in that…

ResVic
- 117
- 4
- 11
0
votes
1 answer
Find hwnd information in a user mode dump in windbg
I am trying to solve one of my applications crashes and top of the call stack looks like this
0012f480 7739b6e3 0002051e 0000001f 00000000 +0x172b6
0012f4ac 7739b874 15b772b6 0002051e 0000001f…

user2800803
- 65
- 1
- 9
0
votes
0 answers
PHP - How to Print Browser Window contents to an image?
Basically, I am setting up a Drag and Drop section of my site that will be within a

Solomon Closson
- 6,111
- 14
- 73
- 115
0
votes
2 answers
How to handle System.OutOfMemoryException error
I have a VB.Net code in Visual Studio which captures a bunch of windows clicks different buttons on these windows. But every 15 minutes, the app crashes and this error pops up.
Does anyone know what it means and the best or easiest way to handle…

Jayesh Surendran Menon
- 75
- 1
- 12
0
votes
1 answer
Calling GetHandleInformation before any call to CloseHandle
Fact 1: Due to some client-constraints we are unable to use Exception mechanism.
Fact 2: Closing a handle which was already closed raises an Exception.
Without going through the reasons for the mention facts, will calling GetHandleInformation() to…

Jim Lanflte
- 43
- 7
0
votes
1 answer
Error while switching from parent to child window and vice versa in selenium Webdriver
String Parentwindow = driver.getWindowHandle();
driver.findElement(By.xpath("//*[@id='ImageButton5']")).click();
Thread.sleep(3000);
for(String winHandle : driver.getWindowHandles()){
driver.switchTo().window(winHandle);
…

Arun Kumar
- 225
- 2
- 8
- 20
0
votes
1 answer
NativeWindowHandle Returns 0, but Spy displays handle
I am trying to automate a process in a application. The Spy++ representation of this process when I do it manually looks like:
WINDOW 002F0B08
002F0B08 P WM_LBUTTONDOWN fwKeys:MK_LBUTTON xPOS:# ypos:# (Start Pos)
002F0B08 P WM_MOUSEMOVE…

jaredcnance
- 712
- 2
- 5
- 23
0
votes
1 answer
Close a single tab in browser using windows application c#
My requirement is very simple. Trying from morning. Couldn't figure it out. Help me out to solve this.
I am opening a google page from my windows application in a button click using Process.start(). It opens in mozila browser. The browser contains 3…

Bharath
- 195
- 1
- 1
- 19
0
votes
1 answer
How to get window handle (int) from chrome extension?
I got a chrome extension and in the event of a new tab I want to get the window handle in windows if the current window.
On the event I got the tab object and I got chrome's internal window id but this is not the handle in…

Omri
- 887
- 8
- 24
0
votes
2 answers
Run code every time a messagebox is shown
I have a rather large C# Forms application. There's an MdiParent which controls lots of MdiChilds. I also created a 'loading screen' which jumps always on top when the user opens forms which require some loading time.
The thing is, if there are…

rvgiesen
- 11
- 3
0
votes
1 answer
Closing a process child window (e.g. a Word window) accessing a specific file
Scenario (for force deleting a file, can't go for delete on restart):
I have a file that is opened in some program, say M.S. Word. There could be some other files as well opened in M.S. Word.
In my C# program, I need to know what process is…

Nadeem Ullah
- 907
- 1
- 9
- 16