Questions tagged [findwindow]

FindWindow is a Win32 API function from user32.dll retrieving a handle to the top-level window whose class name and window name match the specified strings.

FindWindow function

Please note that it works in current process only! For global search use EnumWindows and EnumWindowsProc functions.

This function does not search child windows. This function does not perform a case-sensitive search.
To search child windows, beginning with a specified child window, use the FindWindowEx function.

150 questions
0
votes
2 answers

How to find and close a Window within the application

I've run in the following problem: I've developed a C# application which in one part uses the webbrowser control. Under certain circumstances the webbrowser control opens a Window titled "File Download - Security Warning". My question is: How can I…
0
votes
1 answer

SendMessage stuck after button click

Strange issue I can't put my finger on. Search for the main window, then I search for the button control with the caption "Start". After it finds start and sends the button click, it just sits and never gets past that so I never see "Leaving loop"…
Tsukasa
  • 6,342
  • 16
  • 64
  • 96
0
votes
2 answers

Why does uninstall ask to close an app that isn't open?

When launching uninstall from Explorer, it pops up a message asking the user to close the application. However, the application is not running. What does FindWindow see that the user can't see? This does not happen on Windows95 or systems using the…
Danny Schoemann
  • 1,270
  • 26
  • 41
0
votes
1 answer

How to know if the process is running from service

I made a GUI application that must run in my DELL server to send queries for 24 hours. In case where the application is stopped by random users, or whatever it is, I created a service program that detects when it stops running, and executes it…
Dean Seo
  • 5,486
  • 3
  • 30
  • 49
0
votes
3 answers

How to use Regular Expression with FindWindow?

I am ultimately trying to write something that will check if a specific window exists, and set it as active in the event it is. I was able to use FindWindow to find a literal windows name. int hWnd = FindWindow(null, "121226-000377 - company - …
Fuzz Evans
  • 2,893
  • 11
  • 44
  • 63
0
votes
1 answer

The call is ambiguous: FindWindow(String, String);

I am using this code: IntPtr hwndf = this.Handle; IntPtr hwndParent = FindWindow("ProgMan.exe", null); SetParent(hwndf, hwndParent); However I get an error. The error says : The call is ambiguous between the following methods or properties: …
Layne Wapp
  • 43
  • 11
0
votes
1 answer

Control name from other window

I need to read a text value from other window and query that value to another application (my question will be around the 1st task)…so, I’m “spying” other window (some 3rd party application we use in connection with our product) and waiting for…
Sam Saarian
  • 992
  • 10
  • 13
0
votes
2 answers

How can I have 2 instances of dll function yet still use both of them?

[DllImport("user32.dll")] public static extern int FindWindow(string lpClassName, string lpWindowName); [DllImport("user32.dll")] public static extern IntPtr FindWindow(string lpClassName, string lpWindowName); Like this. I need…
a23ch
  • 1
  • 1
-1
votes
1 answer

Handle external app and populate input fields

I have a C# Windows Desktop app that needs to handle a given external app, - unmanaged code - and populate it's input fields. Note that this must be done programatically, so the use of SPY++ to get windows names is out of discussion, I just can…
digitai
  • 1,870
  • 2
  • 20
  • 37
-1
votes
1 answer

Why I cannot find window?

I use this example to send a string between two applications. When I press the Send button for the first time, the string is sent to the Receiver, but only a part of the string is received. When I press the Send button for the second time, I get…
Gabriel
  • 20,797
  • 27
  • 159
  • 293
-1
votes
1 answer

Why did I fail to find window use parent specified in Spy++?

Imagine there is a web page with a . I open this page in Firefox, and click on the file button. Then a dialog will popup. I want to set the file name edit of the popup dialog programmatically in C++: First I use Spy++ to check…
zhm
  • 3,513
  • 3
  • 34
  • 55
-1
votes
1 answer

Obtain child window from Process.MainWindowHandle

I want to get a textbox handle from process name. I checked it with Spy++ (it's an exe found in the internet, so nothing special): now i want to get this TEdit, but it always return NULL. What am I doing wrong? [DllImport("user32.dll", SetLastError…
Alex Zhukovskiy
  • 9,565
  • 11
  • 75
  • 151
-1
votes
1 answer

How to find window's with same class User32.dll winForm

I need to find textBox's user name and password and button in windows form popup. I found the PopUp id ,but me textBox's inside of element/child that have the same classes and i cant find the specific text box that i need , look at image you will…
Vladimir Potapov
  • 2,347
  • 7
  • 44
  • 71
-2
votes
1 answer

Use Word VBA to find the Window ID of another open APP window

EDIT: "I realized after posting this question that the code does not actually switch to another window but it does get the Window ID Number. thus I modified the question to reflect what the Code actually does. I did get the code to work as 64 bit…
DryBSMT
  • 51
  • 2
  • 12
-3
votes
1 answer

FindWindow in c++

Why cannot I just write: GetWindowThreadProcessId("Name of Window", &PID); instead of: HWND Name = FindWindow(("Name of Window", NULL)); GetWindowThreadProcessId(Name, &PID); What does the Handle function do ? Like, if there wasn't something…
user3742860
  • 100
  • 2
  • 13
1 2 3
9
10