user32.dll implements the Windows USER component that creates and manipulates the standard elements of the Windows user interface, such as the desktop, windows, and menus.
Questions tagged [user32]
547 questions
0
votes
1 answer
Scroll Height of a child window using Windows API?
Does anyone know how to get the height of a scrollable child window using Windows API? I've found GetWindowRect but that appears to only return the RECT of the "visible" area but I want the RECT of the entire "scrollable" child window. This window…

thiesdiggity
- 1,897
- 2
- 18
- 27
0
votes
1 answer
MoveWindow(), skip, dodge or bypass messaging?
I'm resizing a window with MoveWindow() but I don't own that window. I simply stole it from a different process and now I'm messing around with its hWindow.
However the process which I stole it from was running a message loop, handling some of those…

Silviu-Marian
- 10,565
- 6
- 50
- 72
0
votes
0 answers
How to find all non-covered and visible windows?
I need to get the window handle for all windows that are both visible and not covered by other windows.
I can get all the window handles for non-minimized windows using User32 calls, but this returns windows that are behind other windows. I just…

Sugrue
- 3,629
- 5
- 35
- 53
0
votes
1 answer
Reading Desktop Icons via ListView (LVM_GETITEM) - Windows 7 problems
The following code works fine in Windows XP, and was working in Windows 7 at one point, but no longer works. I can't seem to figure out why unfortunately. Has anyone else had issues?
To be more specific, it finds all the icons, and their locations…

Para
- 836
- 8
- 18
0
votes
2 answers
.lib files and decompiling
I have a .exe which is compiled from a combination of .for (fortran), and .c source files.
It does not run on anything later than Win98, due to an error with the graphics server:
“access violation error in User 32.dll at Ox7e4467a9”
Unless there is…

user1351875
- 1
- 1
0
votes
2 answers
Can I get handle of the process by executable name?
I am using JNA to use user32.dll and kernel32.dll . I have the sample code which can give me the handle if i specify the title of the process.
hWnd = User32.FindWindowA(null, "Call of Duty®: Modern Warfare® 3 Multiplayer");
I really don't want…

Rakesh Juyal
- 35,919
- 68
- 173
- 214
-1
votes
1 answer
Program freezes and won't close when left click is simulated
It's as simple as that. I've been trying to code something that simply left clicks in a certain position, but no matter what programming language I use, the program fails to do so, freezes, refuses to close, and when trying to terminate it shows…

Mittato
- 1
- 1
-1
votes
1 answer
Flickering during call to native method MoveWindow
I have a WPF application that opens a new process (Notepad.exe) using the Process.Start() method. I wrote code that prevents the user from moving the Notepad window where the Top property of the window cannot be less that 130 pixels. I used info…

Ray
- 4,679
- 10
- 46
- 92
-1
votes
1 answer
Using PostMessage() or SendMessage() to send uppercase letters
I'm trying to send uppercase letters or symbols (!@# etc), using the PostMessage() function:
[DllImport("user32.dll")]
public static extern IntPtr PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
I tried sending both shift and the…
user13661398
-1
votes
1 answer
Python keyboard listener
I have used this code and it runs fine. However, there is something weird about it, it's like it's not Python!
The e variable in print_event is used in a way I haven't seen before. It's a regular function that prints whatever is passed to it, but…

Waleed Qutob
- 57
- 1
- 3
- 7
-1
votes
1 answer
C# get mouse button interactions form other applications
I want to write a program in C# that can detect mouse button interactions with ui elements in other apps and get information regarding the ui element that was interacted with and its parents, specifically an identifier for those elements that is the…

AliC
- 1
-1
votes
1 answer
Screen coordinates for cursor never close to 0
I am using the user32.dll function GetCursorPos to get the SCREEN coordinates of my cursor. I need to know if the cursor is at the top of the screen (with multiple monitor setups included).
However, when I try to test for the Y coordinate that…

Jan Kolombo
- 3
- 4
-1
votes
1 answer
How can I remotely execute the ListBox1_DoubleClick event of a ListBox using WinApi/user32.dll or something similar?
I need to invoke the ListBox1_DoubleClick event from another application.
Look below how I think that should be the code:
using System.Runtime.InteropServices;
public class RemoteControl
{
[DllImport("user32.dll", EntryPoint = "FindWindow",…

Paulo Santos
- 38
- 6
-1
votes
1 answer
ShowWindow is unable to show or minimize Task Manager
I need to show Task Manager app programatically, maximize it and minimize it as any other window but there is a problem and it simply doesn't respond to ShowWindow(int hWnd, int nCmdShow).
I am pretty sure I use the correct handle because I…

Santi6
- 11
- 2
-1
votes
1 answer
Why does the BlockInput not work for me ? Did i forget anything?
I want to block the user keyboard input for a short time, but the method does not work.
public partial class NativeMethods
{
[DllImport("user32.dll", EntryPoint = "BlockInput")]
[return: MarshalAs(UnmanagedType.Bool)]
public static…

Colin1860
- 11