¡@

Home 

c# Programming Glossary: user32.dll

Change desktop wallpaper using code in .NET

http://stackoverflow.com/questions/1061678/change-desktop-wallpaper-using-code-in-net

0x01 const int SPIF_SENDWININICHANGE 0x02 DllImport user32.dll CharSet CharSet.Auto static extern int SystemParametersInfo..

C# - Make a borderless form movable?

http://stackoverflow.com/questions/1592876/c-sharp-make-a-borderless-form-movable

0xA1 public const int HT_CAPTION 0x2 DllImportAttribute user32.dll public static extern int SendMessage IntPtr hWnd int Msg int.. hWnd int Msg int wParam int lParam DllImportAttribute user32.dll public static extern bool ReleaseCapture private void Form1_MouseDown..

Using global keyboard hook (WH_KEYBOARD_LL) in WPF / C#

http://stackoverflow.com/questions/1639331/using-global-keyboard-hook-wh-keyboard-ll-in-wpf-c-sharp

proc GetModuleHandle curModule.ModuleName 0 DllImport user32.dll CharSet CharSet.Auto SetLastError true public static extern.. lpfn IntPtr hMod uint dwThreadId DllImport user32.dll CharSet CharSet.Auto SetLastError true return MarshalAs UnmanagedType.Bool.. extern bool UnhookWindowsHookEx IntPtr hhk DllImport user32.dll CharSet CharSet.Auto SetLastError true public static extern..

How to simulate Mouse Click in C#?

http://stackoverflow.com/questions/2416748/how-to-simulate-mouse-click-in-c

public class Form1 Form DllImport user32.dll CharSet CharSet.Auto CallingConvention CallingConvention.StdCall..

Set global hotkeys using C#

http://stackoverflow.com/questions/2450373/set-global-hotkeys-using-c-sharp

this dll that appears to be the corrrect path DllImport user32.dll private static extern int RegisterHotKey IntPtr hwnd int id.. IntPtr hwnd int id int fsModifiers int vk DllImport user32.dll private static extern int UnregisterHotKey IntPtr hwnd int id.. IDisposable Registers a hot key with Windows. DllImport user32.dll private static extern bool RegisterHotKey IntPtr hWnd int id..

Simulating Key Press c#

http://stackoverflow.com/questions/3047375/simulating-key-press-c-sharp

Here's an example... static class Program DllImport user32.dll public static extern int SetForegroundWindow IntPtr hWnd STAThread.. UInt32 WM_KEYDOWN 0x0100 const int VK_F5 0x74 DllImport user32.dll static extern bool PostMessage IntPtr hWnd UInt32 Msg int wParam..

Kill child process when parent process is killed

http://stackoverflow.com/questions/3342941/kill-child-process-when-parent-process-is-killed

each child process with the job. For example DllImport user32.dll SetLastError true public static extern uint GetWindowThreadProcessId..

Show Console in Windows Application?

http://stackoverflow.com/questions/472282/show-console-in-windows-application

static extern bool AttachConsole int dwProcessId DllImport user32.dll static extern IntPtr GetForegroundWindow DllImport user32.dll.. static extern IntPtr GetForegroundWindow DllImport user32.dll SetLastError true static extern uint GetWindowThreadProcessId..

TreeView Remove CheckBox by some Nodes

http://stackoverflow.com/questions/4826556/treeview-remove-checkbox-by-some-nodes

public int cChildren public IntPtr lParam DllImport user32.dll CharSet CharSet.Auto private static extern IntPtr SendMessage..

Log off user from Win XP programmatically in C#

http://stackoverflow.com/questions/484278/log-off-user-from-win-xp-programmatically-in-c-sharp

System.Runtime.InteropServices class Class1 DllImport user32.dll static extern bool ExitWindowsEx uint uFlags uint dwReason STAThread..

How do I suspend painting for a control and its children?

http://stackoverflow.com/questions/487661/how-do-i-suspend-painting-for-a-control-and-its-children

how to use this message class DrawingControl DllImport user32.dll public static extern int SendMessage IntPtr hWnd Int32 wMsg..

Get a screenshot of a specific application [duplicate]

http://stackoverflow.com/questions/891345/get-a-screenshot-of-a-specific-application

int top public int right public int bottom DllImport user32.dll public static extern IntPtr GetWindowRect IntPtr hWnd ref Rect..

Get instance of Excel application with C# by Handle

http://stackoverflow.com/questions/1118735/get-instance-of-excel-application-with-c-sharp-by-handle

of active excel window i use this api DllImportAttribute User32.dll private static extern int FindWindow String ClassName String..

How to draw directly on the Windows desktop, C#?

http://stackoverflow.com/questions/1536141/how-to-draw-directly-on-the-windows-desktop-c

System.Runtime.InteropServices class Program DllImport User32.dll static extern IntPtr GetDC IntPtr hwnd DllImport User32.dll.. static extern IntPtr GetDC IntPtr hwnd DllImport User32.dll static extern void ReleaseDC IntPtr dc static void Main string..

Check if an application is idle for a time period and lock it

http://stackoverflow.com/questions/1541981/check-if-an-application-is-idle-for-a-time-period-and-lock-it

uint dwTime public partial class Form1 Form DllImport User32.dll public static extern bool LockWorkStation DllImport User32.dll.. public static extern bool LockWorkStation DllImport User32.dll private static extern bool GetLastInputInfo ref LASTINPUTINFO..

How can I get functionality similar to Spy++ in my C# app?

http://stackoverflow.com/questions/1967604/how-can-i-get-functionality-similar-to-spy-in-my-c-sharp-app

int GWL_ID 12 public const int WM_GETTEXT 0x000D DllImport User32.dll public static extern int GetWindowLong IntPtr hWnd int index.. extern int GetWindowLong IntPtr hWnd int index DllImport User32.dll public static extern IntPtr SendDlgItemMessage IntPtr hWnd int.. int uMsg int nMaxCount StringBuilder lpString DllImport User32.dll public static extern IntPtr GetParent IntPtr hWnd private static..

Copy and Modify selected text in different application

http://stackoverflow.com/questions/235972/copy-and-modify-selected-text-in-different-application

window and then capture the clipboard content. DllImport User32.dll private static extern bool SetForegroundWindow IntPtr hWnd DllImport..

Sending keystrokes to a program

http://stackoverflow.com/questions/2744111/sending-keystrokes-to-a-program

share improve this question By Window name DllImport User32.dll static extern IntPtr FindWindow string lpClassName string lpWindowName.. string lpClassName string lpWindowName DllImport User32.dll static extern int SetForegroundWindow IntPtr hWnd IntPtr ptrFF..

C# Force Form Focus

http://stackoverflow.com/questions/46030/c-sharp-force-form-focus

extern bool SetForegroundWindow IntPtr hWnd DllImport User32.dll EntryPoint ShowWindowAsync private static extern bool ShowWindowAsync..

How to send text to Notepad in C#/Win32?

http://stackoverflow.com/questions/523405/how-to-send-text-to-notepad-in-c-win32

the same shown within Windows Task Manager . DllImport User32.dll EntryPoint SendMessage public static extern int SendMessage.. string lpszClass string lpszWindow DllImport User32.dll public static extern int SendMessage IntPtr hWnd int uMsg int..

Clipboard event C#

http://stackoverflow.com/questions/621577/clipboard-event-c-sharp

I think you'll have to use some p invoke DllImport User32.dll CharSet CharSet.Auto public static extern IntPtr SetClipboardViewer..

How do you do AppBar docking (to screen edge, like WinAmp) in WPF?

http://stackoverflow.com/questions/75785/how-do-you-do-appbar-docking-to-screen-edge-like-winamp-in-wpf

int dwMessage ref APPBARDATA pData DllImport User32.dll CharSet CharSet.Auto private static extern int RegisterWindowMessage..

How to use use late binding to get excel instance?

http://stackoverflow.com/questions/779363/how-to-use-use-late-binding-to-get-excel-instance

bool EnumChildCallback int hwnd ref int lParam DllImport User32.dll public static extern bool EnumChildWindows int hWndParent EnumChildCallback.. EnumChildCallback lpEnumFunc ref int lParam DllImport User32.dll public static extern int GetClassName int hWnd StringBuilder.. As Integer ByRef lParam As Integer As Boolean DllImport User32.dll _ Public Function EnumChildWindows ByVal hWndParent As Integer..