window-handles

GUI Automation testing - Window handle questions

Our company is currently writing a GUI automation testing tool for compact framework applications. We have initially searched many tools but none of them was right for us. By using the tool you can record test-cases and group them together to test-suites. For every test-suite there is generated an application, which launches the applic...

Grab and move application windows from a .NET app?

Is it possible for a .NET application to grab all the window handles currently open, and move/resize these windows? I'd pretty sure its possible using P/Invoke, but I was wondering if there were some managed code wrappers for this functionality. ...

Winforms issue - Error creating window handle

We are seeing this error in a winforms application. Can anyone help on why you would see this error and more inportantly how to fix it or avoid it happening. System.ComponentModel.Win32Exception: Error creating window handle. at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp) at System.Windows.Forms.Control.Create...

What to do about "Error creating window handle" errors in a C# application?

I've already looked at this question, and I've already checked out the suggestions that were made there. My program creates and destroys a lot of UI controls (a lot of UI controls), and anything that makes controls hang around after they're "destroyed" will cause this problem. (Fun fact: if you don't set a ToolStrip control's Visible ...

Mac OS X: Can one process render to another process's window?

Greetings! I'm currently porting a web browser plugin from Win32 to MacOSX. One of the features of the plugin is that when the plugin is loaded, it spawns a separate process that serves as the "engine" of the plugin and executes drawing operations into the window of the plugin (specifically, by attaching an OpenGL context to the parent ...

Can I send / receive window messages without a window?

I'm writing a .NET wrapper around an old MFC-based library we have. It's based around a class that sends notifications using window messages; it has a function that lets the user pass in a handle to a window, and that window will receive the messages. I could just require the users of my wrapper to subclass Control and pass their contr...

How do I create a message-only window from windows forms?

I'm trying to create a message-only window to receive window messages from an MFC library class, within a winforms application. I've tried subclassing NativeWindow, and in the constructor requesting a window handle like this: CreateParams cp = new CreateParams(); cp.Parent = (IntPtr)HWND_MESSAGE; this.CreateHandle(cp); but I get a Wi...

Modifying opacity of any window from C#

Hi, Is it possible to modify the opacity of all opened windows from C#. I googled for minimizing the windows and i came to know that its possible with pInvoke calls. It even worked. Similarly is it possible to change the opacity of all the opened windows from C#? Also, i am not in to MFC stuffs. Still is there any tools to know the ...

C# get window handle after starting a process

Is there a way to get the window handle (IntPtr) for a window after its launched from a C# app with Process.Start()? ...

Get child window handles in C#

I'm starting a process in C# and then sending Windows messages to that process with SendMessage. Usually I send the messages to Process.MainWindowHandle, but in some instances I might need to find a child window handle and send messages there instead. How would I do that in C# and what are the options for finding child windows (i.e. do...

Detect someone hooking onto a window handle

Can you detect if someone is trying to hook into a window handle of your application (or a part thereof) in .NET? ...

OutOfMemoryException, large Private Data

Hello, In previous series: http://stackoverflow.com/questions/2543648/outofmemoryexception-stack-size-is-huge-large-number-of-threads I have a .net windows service that consumes a lot of memory. The GC heap is not big. Also the stack size is not big. What is big is something called a private data. Also I can see in task manager that m...

Get window handle from window class name

I'm trying to get a window handle on a child window in my process and the only information I have is the window class name. Are there any win32 functions I can use for that? I'm doing this from C#. A bit more detail: This is a Visual Studio plugin, written in C#. So my process is visual studio, which has lots of windows. One of them ha...

Get all window handles for a process

Using Microsoft Spy++, I can see that the following windows that belong to a process: Process XYZ window handles, displayed in tree form just like Spy++ gives me: A B C D E F G H I J K I can get the process, and the MainWindowHandle property points to the handle for window F. If I enumerate the child windows us...

Handling invalid window handle

The application retrieve window handles, using Enum* routines. It happens that in the while the application manage the handle (get class name, window statistics...) of an enumerated/created window, the handle is no more valid. The code managing window handles are protected using a try/catch block, but the window handle is stored and the...

How to get the main window handle of a process using JScript?

Is there any method in JScript to get the handle of the main window of a process by providing the process name? The Process.MainWindowHandle property works only in JScript .NET. Is anything similar available in classic JScript? ...

Get menu handle

Hello, I want to get the main menu handle for outlook using an API function, I tried to use Enumwindowchilds but it didn't get the menu handle. This is the menu i want to get the handle for: Main can anybody provide a sample code?? Thanks in advance ...