User32 Class

Platform Invocation methods (P/Invoke), access unmanaged code.

User32.dll.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[HideModuleNameAttribute]
public sealed class User32
Inheritance
Object    User32

Methods

ActivateKeyboardLayout Sets the input locale identifier (formerly called the keyboard layout handle) for the calling thread or the current process.

The input locale identifier specifies a locale as well as the physical layout of the keyboard.

AllowSetForegroundWindow Enables the specified process to set the foreground window using the SetForegroundWindow(IntPtr) function.

The calling process must already be able to set the foreground window.

AnimateWindow(IntPtr, Int32, WindowAnimation) Produces special effects when showing or hiding a window.

This doesn't show the window so make sure you call Show or set Visible property to after calling AnimateWindow(IntPtr, Int32, WindowAnimation).

AnimateWindow(SafeHandle, Int32, WindowAnimation) Produces special effects when showing or hiding a window.

This doesn't show the window so make sure you call Show or set Visible property to after calling AnimateWindow(IntPtr, Int32, WindowAnimation).

AnyPopup Indicates whether an owned, visible, top-level pop-up, or overlapped window exists on the screen. The function searches the entire screen, not just the calling application's client area.

This function is provided only for compatibility with 16-bit versions of Windows. It is generally not useful.
Obsolete.

AppendMenu(IntPtr, UInt32, UIntPtr, String) Appends a new item to the end of the specified menu bar, drop-down menu, submenu, or shortcut menu.

You can use this function to specify the content, appearance, and behavior of the menu item.

AppendMenu(SafeHandle, UInt32, UIntPtr, String) Appends a new item to the end of the specified menu bar, drop-down menu, submenu, or shortcut menu.

You can use this function to specify the content, appearance, and behavior of the menu item.

AttachThreadInput Attaches or detaches the input processing mechanism of one thread to that of another thread.
BeginDeferWindowPos Allocates memory for a multiple-window- position structure and returns the handle to the structure.
BeginPaint(HandleRef, PaintStruct) Prepares the specified window for painting and fills a PaintStruct structure with information about the painting.
BeginPaint(IntPtr, PaintStruct) Prepares the specified window for painting and fills a PaintStruct structure with information about the painting.
BeginPaint(SafeHandle, PaintStruct) Prepares the specified window for painting and fills a PaintStruct structure with information about the painting.
BlockInput Blocks keyboard and mouse input events from reaching applications.

Note that only the thread that blocked input can successfully unblock input.

BringWindowToTop(IntPtr) Brings the specified window to the top of the Z order. If the window is a top-level window, it is activated.

If the window is a child window, the top-level parent window associated with the child window is activated.

BringWindowToTop(SafeHandle) Brings the specified window to the top of the Z order. If the window is a top-level window, it is activated.

If the window is a child window, the top-level parent window associated with the child window is activated.

BroadcastSystemMessage(BroadcastSystemMessageFlags, BroadcastSystemMessageInfo, WindowMessages, IntPtr, IntPtr) Sends a message to the specified recipients.

The recipients can be applications, installable drivers, network drivers, system-level device drivers, or any combination of these system components.

To receive additional information if the request is defined, use the BroadcastSystemMessageEx(BroadcastSystemMessageFlags, BroadcastSystemMessageInfo, WindowMessages, IntPtr, IntPtr, BroadcastSystemMessageExInfo) function.

BroadcastSystemMessage(BroadcastSystemMessageFlags, BroadcastSystemMessageInfo, UInt32, IntPtr, IntPtr) Sends a message to the specified recipients.

The recipients can be applications, installable drivers, network drivers, system-level device drivers, or any combination of these system components.

To receive additional information if the request is defined, use the BroadcastSystemMessageEx(BroadcastSystemMessageFlags, BroadcastSystemMessageInfo, WindowMessages, IntPtr, IntPtr, BroadcastSystemMessageExInfo) function.

BroadcastSystemMessageEx(BroadcastSystemMessageFlags, BroadcastSystemMessageInfo, WindowMessages, IntPtr, IntPtr, BroadcastSystemMessageExInfo) Sends a message to the specified recipients.

The recipients can be applications, installable drivers, network drivers, system-level device drivers, or any combination of these system components.

This function is similar to BroadcastSystemMessage(BroadcastSystemMessageFlags, BroadcastSystemMessageInfo, WindowMessages, IntPtr, IntPtr) except that this function can return more information from the recipients

BroadcastSystemMessageEx(BroadcastSystemMessageFlags, BroadcastSystemMessageInfo, UInt32, IntPtr, IntPtr, BroadcastSystemMessageExInfo) Sends a message to the specified recipients.

The recipients can be applications, installable drivers, network drivers, system-level device drivers, or any combination of these system components.

This function is similar to BroadcastSystemMessage(BroadcastSystemMessageFlags, BroadcastSystemMessageInfo, WindowMessages, IntPtr, IntPtr) except that this function can return more information from the recipients

CalculatePopupWindowPosition Calculates an appropriate pop-up window position using the specified anchor point, pop-up window size, flags, and the optional exclude rectangle.

When the specified pop-up window size is smaller than the desktop window size, use the CalculatePopupWindowPosition(NativePoint, NativeSize, PopupWindowPositionFlags, NativeRectangle, NativeSize) function to ensure that the pop-up window is fully visible on the desktop window, regardless of the specified anchor point.

CallNextHookEx(IntPtr, Int32, IntPtr, KeyboardLowLevelHookStruct) Passes the hook information to the next hook procedure in the current hook chain.

A hook procedure can call this function either before or after processing the hook information.

CallNextHookEx(IntPtr, Int32, IntPtr, MouseLowLevelHookStruct) Passes the hook information to the next hook procedure in the current hook chain.

A hook procedure can call this function either before or after processing the hook information.

CallNextHookEx(IntPtr, Int32, IntPtr, IntPtr) Passes the hook information to the next hook procedure in the current hook chain.

A hook procedure can call this function either before or after processing the hook information.

ChangeDisplaySettings Changes the settings of the default display device to the specified graphics mode.
ChangeDisplaySettingsEx Changes the settings of the specified display device to the specified graphics mode.
ChangeWindowMessageFilterEx(HandleRef, EditControlMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified edit-control (typically a TextBox).
ChangeWindowMessageFilterEx(HandleRef, ListBoxMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified ListBox control.
ChangeWindowMessageFilterEx(HandleRef, ListViewMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified ListView control.
ChangeWindowMessageFilterEx(HandleRef, ProgressBarMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified ProgressBar control.
ChangeWindowMessageFilterEx(HandleRef, ToolbarMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified ToolBar control.
ChangeWindowMessageFilterEx(HandleRef, WindowMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified window.
ChangeWindowMessageFilterEx(HandleRef, UInt32, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified window.
ChangeWindowMessageFilterEx(IntPtr, EditControlMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified edit-control (typically a TextBox).
ChangeWindowMessageFilterEx(IntPtr, ListBoxMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified ListBox control.
ChangeWindowMessageFilterEx(IntPtr, ListViewMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified ListView control.
ChangeWindowMessageFilterEx(IntPtr, ProgressBarMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified ProgressBar control.
ChangeWindowMessageFilterEx(IntPtr, ToolbarMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified ToolBar control.
ChangeWindowMessageFilterEx(IntPtr, WindowMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified window.
ChangeWindowMessageFilterEx(IntPtr, UInt32, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified window.
ChangeWindowMessageFilterEx(SafeHandle, EditControlMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified edit-control (typically a TextBox).
ChangeWindowMessageFilterEx(SafeHandle, ListBoxMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified ListBox control.
ChangeWindowMessageFilterEx(SafeHandle, ListViewMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified ListView control.
ChangeWindowMessageFilterEx(SafeHandle, ProgressBarMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified ProgressBar control.
ChangeWindowMessageFilterEx(SafeHandle, ToolbarMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified ToolBar control.
ChangeWindowMessageFilterEx(SafeHandle, WindowMessages, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified window.
ChangeWindowMessageFilterEx(SafeHandle, UInt32, ChangeWindowMessageFilterExAction, ChangeFilter) Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified window.
ChildWindowFromPoint(IntPtr, NativePoint) Determines which, if any, of the child windows belonging to a parent window contains the specified point.

The search is restricted to immediate child windows. Grandchildren, and deeper descendant windows are not searched.

To skip certain child windows, use the ChildWindowFromPointEx(IntPtr, NativePoint, WindowSkipOptions) function.

ChildWindowFromPoint(IntPtr, Point) Determines which, if any, of the child windows belonging to a parent window contains the specified point.

The search is restricted to immediate child windows. Grandchildren, and deeper descendant windows are not searched.

To skip certain child windows, use the ChildWindowFromPointEx(IntPtr, NativePoint, WindowSkipOptions) function.

ChildWindowFromPointEx(IntPtr, NativePoint, WindowSkipOptions) Determines which, if any, of the child windows belonging to the specified parent window contains the specified point.

The function can ignore invisible, disabled, and transparent child windows.

The search is restricted to immediate child windows. Grandchildren and deeper descendants are not searched.

ChildWindowFromPointEx(IntPtr, Point, WindowSkipOptions) Determines which, if any, of the child windows belonging to the specified parent window contains the specified point.

The function can ignore invisible, disabled, and transparent child windows.

The search is restricted to immediate child windows. Grandchildren and deeper descendants are not searched.

ClientToScreen(IntPtr, NativePoint) Converts the client-area coordinates of a specified point to screen coordinates.
ClientToScreen(IntPtr, Point) Converts the client-area coordinates of a specified point to screen coordinates.
ClientToScreen(SafeHandle, NativePoint) Converts the client-area coordinates of a specified point to screen coordinates.
ClientToScreen(SafeHandle, Point) Converts the client-area coordinates of a specified point to screen coordinates.
ClipCursor Confines the cursor to a rectangular area on the screen.

If a subsequent cursor position (set by the SetCursorPos(Int32, Int32) function or the mouse) lies outside the rectangle, the system automatically adjusts the position to keep the cursor inside the rectangular area.

CloseClipboard Closes the clipboard.
CloseDesktop Closes an open handle to a desktop object.
CloseWindow Minimizes (but does not destroy) the specified window.
CloseWindowStation Closes an open window station handle.
CopyIcon Copies the specified icon from another module to the current module.
CopyRect(NativeRectangle, NativeRectangle) Copies the coordinates of one NativeRectangle to another.
CopyRect(Rectangle, Rectangle) Copies the coordinates of one Rectangle to another.
CountClipboardFormats Retrieves the number of different data formats currently on the clipboard.
CreateCaret(IntPtr, IntPtr, Int32, Int32) Creates a new shape for the system caret and assigns ownership of the caret to the specified window.

The caret shape can be a line, a block, or a bitmap.

CreateCaret(SafeHandle, IntPtr, Int32, Int32) Creates a new shape for the system caret and assigns ownership of the caret to the specified window.

The caret shape can be a line, a block, or a bitmap.

CreateCursor Creates a cursor having the specified size, bit patterns, and hot spot.
CreateIconFromResource Creates an icon or cursor from resource bits describing the icon.

To specify a desired height or width, use the CreateIconFromResourceEx(Byte, UInt32, Boolean, UInt32, Int32, Int32, CreateIconFromResourceFlags) function

CreateIconFromResourceEx Creates an icon or cursor from resource bits describing the icon.
CreateIconIndirect Creates an icon or cursor from an IconInfo structure.
CreateMenu Creates a menu.

The menu is initially empty, but it can be filled with menu items by using the InsertMenuItem(IntPtr, Int32, Boolean, MenuItemInfo), AppendMenu(IntPtr, UInt32, UIntPtr, String), and InsertMenuItem(IntPtr, Int32, Boolean, MenuItemInfo) functions.

CreateWindowEx Creates an overlapped, pop-up, or child window with an extended window style.
DefDlgProc Calls the default dialog box window procedure to provide default processing for any window messages that a dialog box with a private window class does not process.
DeferWindowPos Updates the specified multiple-window – position structure for the specified window.

The function then returns a handle to the updated structure.

The DeferWindowPos(IntPtr, IntPtr, IntPtr, Int32, Int32, Int32, Int32, SetWindowPosFlags) function uses the information in this structure to change the position and size of a number of windows simultaneously. The BeginDeferWindowPos(Int32) function creates the structure.

DefFrameProc Provides default processing for any window messages that the window procedure of a multiple-document interface (MDI) frame window does not process.

All window messages that are not explicitly processed by the window procedure must be passed to the DefFrameProc(IntPtr, IntPtr, UInt32, IntPtr, IntPtr) function, not the DefWindowProc(IntPtr, UInt32, IntPtr, IntPtr) function.

DefMDIChildProc Provides default processing for any window message that the window procedure of a multiple-document interface (MDI) child window does not process.

A window message not processed by the window procedure must be passed to the DefMDIChildProc(IntPtr, UInt32, IntPtr, IntPtr) function, not to the DefWindowProc(IntPtr, UInt32, IntPtr, IntPtr) function.

DefRawInputProc Calls the default raw input procedure to provide default processing for any raw input messages that an application does not process.

This function ensures that every message is processed.

DefRawInputProc(RawInput, Int32, UInt32) is called with the same parameters received by the window procedure.

DefWindowProc Calls the default window procedure to provide default processing for any window messages that an application does not process.

This function ensures that every message is processed.

DefWindowProc(IntPtr, UInt32, IntPtr, IntPtr) is called with the same parameters received by the window procedure.

DeleteMenu(IntPtr, UInt32, MenuPosition) Deletes an item from the specified menu.

If the menu item opens a menu or submenu, this function destroys the handle to the menu or submenu and frees the memory used by the menu or submenu.

DeleteMenu(SafeHandle, UInt32, MenuPosition) Deletes an item from the specified menu.

If the menu item opens a menu or submenu, this function destroys the handle to the menu or submenu and frees the memory used by the menu or submenu.

DestroyCaret Destroys the caret's current shape, frees the caret from the window, and removes the caret from the screen.
DestroyCursor Destroys a cursor and frees any memory the cursor occupied.

Do not use this function to destroy a shared cursor.

DestroyIcon Destroys an icon and frees any memory the icon occupied.
DestroyMenu(IntPtr) Destroys the specified menu and frees any memory that the menu occupies.
DestroyMenu(SafeHandle) Destroys the specified menu and frees any memory that the menu occupies.
DestroyWindow(IntPtr) Destroys the specified window. The function sends WM_Destroy and WM_NcDestroy messages to the window to deactivate it and remove the keyboard focus from it.

The function also destroys the window's menu, flushes the thread message queue, destroys timers, removes clipboard ownership, and breaks the clipboard viewer chain (if the window is at the top of the viewer chain).

If the specified window is a parent or owner window, DestroyWindow(IntPtr) automatically destroys the associated child or owned windows when it destroys the parent or owner window.

The function first destroys child or owned windows, and then it destroys the parent or owner window.

DestroyWindow(IntPtr) also destroys modeless dialog boxes created by the CreateDialog function.

DestroyWindow(SafeHandle) Destroys the specified window. The function sends WM_Destroy and WM_NcDestroy messages to the window to deactivate it and remove the keyboard focus from it.

The function also destroys the window's menu, flushes the thread message queue, destroys timers, removes clipboard ownership, and breaks the clipboard viewer chain (if the window is at the top of the viewer chain).

If the specified window is a parent or owner window, DestroyWindow(IntPtr) automatically destroys the associated child or owned windows when it destroys the parent or owner window.

The function first destroys child or owned windows, and then it destroys the parent or owner window.

DestroyWindow(IntPtr) also destroys modeless dialog boxes created by the CreateDialog function.

DisableProcessWindowsGhosting Disables the window ghosting feature for the calling GUI process.

Window ghosting is a Windows Manager feature that lets the user minimize, move, or close the main window of an application that is not responding.

DispatchMessage Dispatches a message to a window procedure.

It is typically used to dispatch a message retrieved by the GetMessage(NativeMessage, IntPtr, UInt32, UInt32) function.

DrawEdge(IntPtr, NativeRectangle, DrawEdgeType, DrawEdgeFlags) Draws a 3D edge or flat border on the specified device context.
DrawEdge(IntPtr, Rectangle, DrawEdgeType, DrawEdgeFlags) Draws a 3D edge or flat border on the specified device context.
DrawFrameControl(IntPtr, Rectangle, DrawFrameControlType, DrawFrameControlButtonFlags) Draws a frame control of the specified type and style on the specified device context for a button.
DrawFrameControl(IntPtr, Rectangle, DrawFrameControlType, DrawFrameControlCaptionType) Draws a frame control of the specified type and style on the specified device context for a button.
DrawFrameControl(IntPtr, Rectangle, DrawFrameControlType, DrawFrameControlMenuType) Draws a frame control of the specified type and style on the specified device context for a button.
DrawFrameControl(IntPtr, Rectangle, DrawFrameControlType, DrawFrameControlScrollFlags) Draws a frame control of the specified type and style on the specified device context for a button.
EmptyClipboard Empties the clipboard and frees handles to data in the clipboard.

The function then assigns ownership of the clipboard to the window that currently has the clipboard open.

EnableMenuItem(IntPtr, UInt32, Int32) Sets the state of the specified menu item.
EnableMenuItem(SafeHandle, UInt32, Int32) Sets the state of the specified menu item.
EnableMouseInPointer Enables the mouse to act as a pointer input device and send WM_POINTER* messages.
EnableNonClientDpiScaling In high-DPI displays, enables automatic display scaling of the non-client area portions of the specified top-level window. Must be called during the initialization of that window.

Note: Applications running at a DPI_AWARENESS_CONTEXT of DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 automatically scale their non-client areas by default. They do not need to call this function.

EnableWindow(IntPtr, Boolean) Enables or disables mouse and keyboard input to the specified window or control.

When input is disabled, the window does not receive input such as mouse clicks and key presses.

When input is enabled, the window receives all input.

EnableWindow(SafeHandle, Boolean) Enables or disables mouse and keyboard input to the specified window or control.

When input is disabled, the window does not receive input such as mouse clicks and key presses.

When input is enabled, the window receives all input.

EndDeferWindowPos Simultaneously updates the position and size of one or more windows in a single screen-refreshing cycle.
EndMenu Ends the calling thread's active menu.
EndPaint(HandleRef, PaintStruct) Marks the end of painting in the specified window.

This function is required for each call to the BeginPaint(IntPtr, PaintStruct) function, but only after painting is complete.

EndPaint(IntPtr, PaintStruct) Marks the end of painting in the specified window.

This function is required for each call to the BeginPaint(IntPtr, PaintStruct) function, but only after painting is complete.

EndPaint(SafeHandle, PaintStruct) Marks the end of painting in the specified window.

This function is required for each call to the BeginPaint(IntPtr, PaintStruct) function, but only after painting is complete.

EndTask Forcibly closes the specified window.
EnumChildWindows(IntPtr, DelegatesEnumChildWindowsProc, IntPtr) Enumerates the child windows that belong to the specified parent window by passing the handle to each child window, in turn, to an application-defined callback function.

EnumChildWindows(IntPtr, DelegatesEnumChildWindowsProc, IntPtr) continues until the last child window is enumerated or the callback function returns .

EnumChildWindows(SafeHandle, DelegatesEnumChildWindowsProc, IntPtr) Enumerates the child windows that belong to the specified parent window by passing the handle to each child window, in turn, to an application-defined callback function.

EnumChildWindows(IntPtr, DelegatesEnumChildWindowsProc, IntPtr) continues until the last child window is enumerated or the callback function returns .

EnumDesktops Enumerates all desktops associated with the specified window station of the calling process.

The function passes the name of each desktop, in turn, to an application-defined callback function.

EnumDesktopWindows Enumerates all top-level windows associated with the specified desktop.

It passes the handle to each window, in turn, to an application-defined callback function

EnumDisplayDevices Retrieves information about the display devices in the current session.
EnumDisplayMonitors Enumerates display monitors (including invisible pseudo-monitors associated with the mirroring drivers) that intersect a region formed by the intersection of a specified clipping rectangle and the visible region of a device context.

EnumDisplayMonitors(IntPtr, IntPtr, DelegatesEnumMonitorProc, IntPtr) calls an application-defined DelegatesEnumMonitorProc callback function once for each monitor that is enumerated.

Note that GetSystemMetrics (SM_CMONITORS) counts only the display monitors.

EnumDisplaySettings(String, EnumDisplaySettingsMode, DevMode) Retrieves information about one of the graphics modes for a display device.

To retrieve information for all the graphics modes of a display device, make a series of calls to this function.

EnumDisplaySettings(String, Int32, DevMode) Retrieves information about one of the graphics modes for a display device.

To retrieve information for all the graphics modes of a display device, make a series of calls to this function.

EnumThreadWindows Enumerates all nonchild windows associated with a thread by passing the handle to each window, in turn, to an application-defined callback function.

EnumThreadWindows(UInt32, DelegatesEnumThreadWindowsProc, IntPtr) continues until the last window is enumerated or the callback function returns .

To enumerate child windows of a particular window, use the EnumChildWindows(IntPtr, DelegatesEnumChildWindowsProc, IntPtr) function.

EnumWindows Enumerates all top-level windows on the screen by passing the handle to each window, in turn, to an application-defined callback function.

EnumWindows(DelegatesEnumWindowsProc, IntPtr) continues until the last top-level window is enumerated or the callback function returns .

EqualRect(NativeRectangle, NativeRectangle) Determines whether the two specified NativeRectangle are equal by comparing the coordinates of their upper-left and lower-right corners.

Note that the EqualRect(NativeRectangle, NativeRectangle) function does not treat empty rectangles as equal if their coordinates are different.

EqualRect(Rectangle, Rectangle) Determines whether the two specified NativeRectangle are equal by comparing the coordinates of their upper-left and lower-right corners.

Note that the EqualRect(NativeRectangle, NativeRectangle) function does not treat empty rectangles as equal if their coordinates are different.

Equals Determines whether the specified object is equal to the current object.
(Inherited from Object)
ExcludeUpdateRgn(IntPtr, IntPtr) prevents drawing within invalid areas of a window by excluding an updated region in the window from a clipping region.
ExcludeUpdateRgn(IntPtr, SafeHandle) prevents drawing within invalid areas of a window by excluding an updated region in the window from a clipping region.
ExitWindowsEx Logs off the interactive user, shuts down the system, or shuts down and restarts the system.

It sends the WM_QUERYENDSESSION message to all applications to determine if they can be terminated.

FillRect(IntPtr, NativeRectangle, IntPtr) Fills a rectangle by using the specified brush.

This function includes the left and top borders, but excludes the right and bottom borders of the rectangle.

FillRect(IntPtr, Rectangle, IntPtr) Fills a rectangle by using the specified brush.

This function includes the left and top borders, but excludes the right and bottom borders of the rectangle.

FindWindow Retrieves a handle to the top-level window whose class name and window name match the specified strings.

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(IntPtr, IntPtr, String, String) function.

FindWindowEx(IntPtr, IntPtr, String, String) Retrieves a handle to a window whose class name and window name match the specified strings.

The function searches child windows, beginning with the one following the specified child window.

This function does not perform a case-sensitive search.

FindWindowEx(SafeHandle, SafeHandle, String, String) Retrieves a handle to a window whose class name and window name match the specified strings.

The function searches child windows, beginning with the one following the specified child window.

This function does not perform a case-sensitive search.

FlashWindowEx Flashes the specified window.

It does not change the active state of the window.

FrameRect(IntPtr, NativeRectangle, IntPtr) Draws a border around the specified rectangle by using the specified brush.

The width and height of the border are always one logical unit.

FrameRect(IntPtr, Rectangle, IntPtr) Draws a border around the specified rectangle by using the specified brush.

The width and height of the border are always one logical unit.

GetActiveWindow Retrieves the window handle to the active window attached to the calling thread's message queue.
GetAncestor(IntPtr, GetAncestorFlags) Retrieves the handle to the ancestor of the specified window.
GetAncestor(SafeHandle, GetAncestorFlags) Retrieves the handle to the ancestor of the specified window.
GetAsyncKeyState(Int32) Determines whether a key is up or down at the time the function is called, and whether the key was pressed after a previous call to GetAsyncKeyState(Int32).
GetAsyncKeyState(Keys) Determines whether a key is up or down at the time the function is called, and whether the key was pressed after a previous call to GetAsyncKeyState(Int32).
GetAwarenessFromDpiAwarenessContext Retrieves the DpiAwareness value from a DPI_AWARENESS_CONTEXT.
GetCapture Retrieves a handle to the window (if any) that has captured the mouse.

Only one window at a time can capture the mouse; this window receives mouse input whether or not the cursor is within its borders.

GetCaretBlinkTime Retrieves the time required to invert the caret's pixels. The user can set this value.
GetClassLong(HandleRef, ClassLongValues) Retrieves the specified 32-bit (DWORD) value from the WNDCLASSEX structure associated with the specified window.

Note: This function has been superseded by the GetClassLongPtr(IntPtr, ClassLongValues) function.

To write code that is compatible with both 32-bit and 64-bit versions of Windows, use GetClassLongPtr(IntPtr, ClassLongValues).

GetClassLong(IntPtr, ClassLongValues) Retrieves the specified 32-bit (DWORD) value from the WNDCLASSEX structure associated with the specified window.

Note: This function has been superseded by the GetClassLongPtr(IntPtr, ClassLongValues) function.

To write code that is compatible with both 32-bit and 64-bit versions of Windows, use GetClassLongPtr(IntPtr, ClassLongValues).

GetClassLong(SafeHandle, ClassLongValues) Retrieves the specified 32-bit (DWORD) value from the WNDCLASSEX structure associated with the specified window.

Note: This function has been superseded by the GetClassLongPtr(IntPtr, ClassLongValues) function.

To write code that is compatible with both 32-bit and 64-bit versions of Windows, use GetClassLongPtr(IntPtr, ClassLongValues).

GetClassLongPtr(HandleRef, ClassLongValues) Retrieves the specified value from the WNDCLASSEX structure associated with the specified window.
GetClassLongPtr(IntPtr, ClassLongValues) Retrieves the specified value from the WNDCLASSEX structure associated with the specified window.
GetClassLongPtr(SafeHandle, ClassLongValues) Retrieves the specified value from the WNDCLASSEX structure associated with the specified window.
GetClassName(IntPtr, StringBuilder, Int32) Retrieves the name of the class to which the specified window belongs.
GetClassName(SafeHandle, StringBuilder, Int32) Retrieves the name of the class to which the specified window belongs.
GetClientRect(IntPtr, NativeRectangle) Retrieves the coordinates of a window's client area.

The client coordinates specify the upper-left and lower-right corners of the client area.

Because client coordinates are relative to the upper-left corner of a window's client area, the coordinates of the upper-left corner are (0,0).

GetClientRect(IntPtr, Rectangle) Retrieves the coordinates of a window's client area.

The client coordinates specify the upper-left and lower-right corners of the client area.

Because client coordinates are relative to the upper-left corner of a window's client area, the coordinates of the upper-left corner are (0,0).

GetClientRect(SafeHandle, NativeRectangle) Retrieves the coordinates of a window's client area.

The client coordinates specify the upper-left and lower-right corners of the client area.

Because client coordinates are relative to the upper-left corner of a window's client area, the coordinates of the upper-left corner are (0,0).

GetClientRect(SafeHandle, Rectangle) Retrieves the coordinates of a window's client area.

The client coordinates specify the upper-left and lower-right corners of the client area.

Because client coordinates are relative to the upper-left corner of a window's client area, the coordinates of the upper-left corner are (0,0).

GetClipCursor Retrieves the screen coordinates of the rectangular area to which the cursor is confined.

To confine the cursor to a rectangular area on the screen, use the ClipCursor(NativeRectangle) function.

GetCursor Retrieves a handle to the current cursor.

To get information on the global cursor, even if it is not owned by the current thread, use GetCursorInfo(CursorInfo).

GetCursorInfo Retrieves information about the global cursor.
GetCursorPos(NativePoint) Retrieves the position of the mouse cursor, in screen coordinates.
GetCursorPos(Point) Retrieves the position of the mouse cursor, in screen coordinates.
GetDC(IntPtr) Retrieves a IntPtr handle to a device context (DC) for the client area of a specified window or for the entire screen.

You can use the returned handle in subsequent GDI functions to draw in the DC.

The device context is an opaque data structure, whose values are used internally by GDI.

GetDC(SafeHandle) Retrieves a IntPtr handle to a device context (DC) for the client area of a specified window or for the entire screen.

You can use the returned handle in subsequent GDI functions to draw in the DC.

The device context is an opaque data structure, whose values are used internally by GDI.

GetDesktopWindow Retrieves a handle to the desktop window.

The desktop window is the area on top of which other windows are painted.

GetDisplayConfigBufferSizes Retrieves the size of the buffers that are required to call the QueryDisplayConfig(QueryDisplayConfigFlags, UInt32, DisplayConfigPathInfo, UInt32, DisplayConfigModeInfo, DisplayConfigTopologyId) function.
GetDlgItem(IntPtr, Int32) Retrieves a handle to a control in the specified dialog box.
GetDlgItem(SafeHandle, Int32) Retrieves a handle to a control in the specified dialog box.
GetDoubleClickTime Retrieves the current double-click time for the mouse.

A double-click is a series of two clicks of the mouse button, the second occurring within a specified time after the first.

The double-click time is the maximum number of milliseconds that may occur between the first and second click of a double-click.

The maximum double-click time is 5000 milliseconds.

GetDpiForSystem Returns the system DPI.
GetDpiForWindow Returns the dots per inch (dpi) value for the associated window.
GetDpiFromDpiAwarenessContext Retrieves the DPI from a given DPI_AWARENESS_CONTEXT handle.

This enables you to determine the DPI of a thread without needed to examine a window created within that thread.

GetFocus Retrieves the handle to the window that has the keyboard focus, if the window is attached to the calling thread's message queue..
GetForegroundWindow Retrieves a handle to the foreground window (the window with which the user is currently working).

The system assigns a slightly higher priority to the thread that creates the foreground window than it does to other threads.

GetGuiResources(IntPtr, GetGuiResourcesFlags) Retrieves the count of handles to graphical user interface (GUI) objects in use by the specified process.
GetGuiResources(SafeHandle, GetGuiResourcesFlags) Retrieves the count of handles to graphical user interface (GUI) objects in use by the specified process.
GetHashCode Serves as the default hash function.
(Inherited from Object)
GetIconInfo Retrieves information about the specified icon or cursor.
GetIconInfoEx Retrieves information about the specified icon or cursor.
GetInputState Determines whether there are mouse-button or keyboard messages in the calling thread's message queue.
GetKBCodePage Retrieves the current code page.

Note: This function is provided only for compatibility with 16-bit versions of Windows. Applications should use the GetOEMCodePage function to retrieve the OEM code-page identifier for the system.
Obsolete.

GetKeyboardLayout Retrieves the active input locale identifier (formerly called the keyboard layout).
GetKeyboardLayoutName(IntPtr) Retrieves the name of the active input locale identifier (formerly called the keyboard layout) for the system.
GetKeyboardLayoutName(StringBuilder) Retrieves the name of the active input locale identifier (formerly called the keyboard layout) for the system.
GetKeyboardState Copies the status of the 256 virtual keys to the specified buffer.
GetKeyboardType Retrieves information about the current keyboard.
GetKeyState(Int32) Retrieves the status of the specified virtual key.

The status specifies whether the key is up, down, or toggled (on, off—alternating each time the key is pressed).

GetKeyState(Keys) Retrieves the status of the specified virtual key.

The status specifies whether the key is up, down, or toggled (on, off—alternating each time the key is pressed).

GetKeyState(VirtualKeys) Retrieves the status of the specified virtual key.

The status specifies whether the key is up, down, or toggled (on, off—alternating each time the key is pressed).

GetLastInputInfo Retrieves the time of the last input (mouse or keyboard) event.

This function is useful for input idle detection. However, GetLastInputInfo(LastInputInfo) does not provide system-wide user input information across all running sessions. Rather, GetLastInputInfo(LastInputInfo) provides session-specific user input information for only the session that invoked the function

GetLayeredWindowAttributes(IntPtr, UInt32, Byte, LayeredWindowAttributesFlags) Retrieves the opacity and transparency color key of a layered window.
GetLayeredWindowAttributes(IntPtr, UInt32, Int32, LayeredWindowAttributesFlags) Retrieves the opacity and transparency color key of a layered window.
GetLayeredWindowAttributes(SafeHandle, UInt32, Byte, LayeredWindowAttributesFlags) Retrieves the opacity and transparency color key of a layered window.
GetLayeredWindowAttributes(SafeHandle, UInt32, Int32, LayeredWindowAttributesFlags) Retrieves the opacity and transparency color key of a layered window.
GetMenuItemCount(IntPtr) Determines the number of items in the specified menu.
GetMenuItemCount(SafeHandle) Determines the number of items in the specified menu.
GetMenuItemID(IntPtr, Int32) Retrieves the menu item identifier of a menu item located at the specified position in a menu.
GetMenuItemID(SafeHandle, Int32) Retrieves the menu item identifier of a menu item located at the specified position in a menu.
GetMenuItemInfo(IntPtr, UInt32, Boolean, MenuItemInfo) Gets the handle of the form's system menu.
GetMenuItemInfo(SafeHandle, UInt32, Boolean, MenuItemInfo) Gets the handle of the form's system menu.
GetMenuState(IntPtr, UInt32, MenuPosition) Retrieves the menu flags associated with the specified menu item.

If the menu item opens a submenu, this function also returns the number of items in the submenu.
Obsolete.

GetMenuState(SafeHandle, UInt32, MenuPosition) Retrieves the menu flags associated with the specified menu item.

If the menu item opens a submenu, this function also returns the number of items in the submenu.
Obsolete.

GetMenuString(IntPtr, UInt32, StringBuilder, Int32, MenuPosition) Copies the text string of the specified menu item into the specified buffer.
GetMenuString(SafeHandle, UInt32, StringBuilder, Int32, MenuPosition) Copies the text string of the specified menu item into the specified buffer.
GetMessage(NativeMessage, IntPtr, UInt32, UInt32) Retrieves a message from the calling thread's message queue.

The function dispatches incoming sent messages until a posted message is available for retrieval.

Unlike GetMessage(NativeMessage, IntPtr, UInt32, UInt32), the PeekMessage(NativeMessage, IntPtr, UInt32, UInt32, PeekMessageFlags) function does not wait for a message to be posted before returning.

GetMessage(NativeMessage, HandleRef, UInt32, UInt32) Retrieves a message from the calling thread's message queue.

The function dispatches incoming sent messages until a posted message is available for retrieval.

Unlike GetMessage(NativeMessage, IntPtr, UInt32, UInt32), the PeekMessage(NativeMessage, IntPtr, UInt32, UInt32, PeekMessageFlags) function does not wait for a message to be posted before returning.

GetMessageExtraInfo Retrieves the extra message information for the current thread.

Extra message information is an application- or driver-defined value associated with the current thread's message queue.

GetMessagePos Retrieves the cursor position for the last message retrieved by the GetMessage(NativeMessage, IntPtr, UInt32, UInt32) function.

To determine the current position of the cursor, use the GetCursorPos(NativePoint) function.

GetMessageTime Retrieves the message time for the last message retrieved by the GetMessage function.

The time is a long integer that specifies the elapsed time, in milliseconds, from the time the system was started to the time the message was created (that is, placed in the thread's message queue).

GetMonitorInfo(IntPtr, MonitorInfo) Retrieves information about a display monitor.
GetMonitorInfo(IntPtr, MonitorInfoEx) Retrieves information about a display monitor.
GetMouseMovePointsEx Retrieves a history of up to 64 previous coordinates of the mouse or pen.
GetNextWindow(IntPtr, GetNextWindowCmd) Retrieves a handle to the next or previous window in the Z-Order.

The next window is below the specified window; the previous window is above.

If the specified window is a topmost window, the function searches for a topmost window.

If the specified window is a top-level window, the function searches for a top-level window.

If the specified window is a child window, the function searches for a child window.

GetNextWindow(SafeHandle, GetNextWindowCmd) Retrieves a handle to the next or previous window in the Z-Order.

The next window is below the specified window; the previous window is above.

If the specified window is a topmost window, the function searches for a topmost window.

If the specified window is a top-level window, the function searches for a top-level window.

If the specified window is a child window, the function searches for a child window.

GetParent(HandleRef) Retrieves a handle to the specified window's parent or owner.

To retrieve a handle to a specified ancestor, use the GetAncestor(IntPtr, GetAncestorFlags) function.

GetParent(IntPtr) Retrieves a handle to the specified window's parent or owner.

To retrieve a handle to a specified ancestor, use the GetAncestor(IntPtr, GetAncestorFlags) function.

GetParent(SafeHandle) Retrieves a handle to the specified window's parent or owner.

To retrieve a handle to a specified ancestor, use the GetAncestor(IntPtr, GetAncestorFlags) function.

GetPhysicalCursorPos Retrieves the position of the cursor in physical coordinates.
GetProcessWindowStation Retrieves a handle to the current window station for the calling process..
GetQueueStatus Retrieves the type of messages found in the calling thread's message queue.
GetRawInputBuffer Performs a buffered read of the raw input data.
GetRawInputData Retrieves the raw input from the specified device.
GetRawInputDeviceInfo(IntPtr, GetRawInputDeviceInfoCommand, IntPtr, UInt32) Retrieves information about the raw input device.
GetRawInputDeviceInfo(IntPtr, UInt32, IntPtr, UInt32) Retrieves information about the raw input device.
GetRawInputDeviceList(IntPtr, UInt32, UInt32) Enumerates the raw input devices attached to the system.
GetRawInputDeviceList(RawInputDeviceList, UInt32, UInt32) Enumerates the raw input devices attached to the system.
GetRegisteredRawInputDevices Retrieves the information about the raw input devices for the current application.
GetScrollInfo(IntPtr, ScrollBarOrientation, ScrollInfo) Retrieves the parameters of a scroll bar, including the minimum and maximum scrolling positions, the page size, and the position of the scroll box (thumb).
GetScrollInfo(SafeHandle, ScrollBarOrientation, ScrollInfo) Retrieves the parameters of a scroll bar, including the minimum and maximum scrolling positions, the page size, and the position of the scroll box (thumb).
GetShellWindow Retrieves a handle to the Shell's desktop window.
GetSystemDpiForProcess Retrieves the system DPI associated with a given process.

This is useful for avoiding compatibility issues that arise from sharing DPI-sensitive information between multiple system-aware processes with different system DPI values.

GetSystemMenu(HandleRef, Boolean) Gets the handle of the form's system menu.
GetSystemMenu(IntPtr, Boolean) Gets the handle of the form's system menu.
GetSystemMenu(SafeHandle, Boolean) Gets the handle of the form's system menu.
GetSystemMetricsForDpi Retrieves the specified system metric or system configuration setting taking into account a provided DPI.
GetThreadDesktop Retrieves a handle to the desktop assigned to the specified thread.
GetThreadDpiAwarenessContext Gets the DPI_AWARENESS_CONTEXT for the current thread.
GetTopWindow(IntPtr) Examines the Z order of the child windows associated with the specified parent window and retrieves a handle to the child window at the top of the Z order.
GetTopWindow(SafeHandle) Examines the Z order of the child windows associated with the specified parent window and retrieves a handle to the child window at the top of the Z order.
GetType Gets the Type of the current instance.
(Inherited from Object)
GetUpdateRect(IntPtr, NativeRectangle, Boolean) Retrieves the coordinates of the smallest rectangle that completely encloses the update region of the specified window.

GetUpdateRect(IntPtr, NativeRectangle, Boolean) retrieves the rectangle in logical coordinates. If there is no update region, GetUpdateRect(IntPtr, NativeRectangle, Boolean) retrieves an empty rectangle (sets all coordinates to zero).

GetUpdateRect(IntPtr, Rectangle, Boolean) Retrieves the coordinates of the smallest rectangle that completely encloses the update region of the specified window.

GetUpdateRect(IntPtr, NativeRectangle, Boolean) retrieves the rectangle in logical coordinates. If there is no update region, GetUpdateRect(IntPtr, NativeRectangle, Boolean) retrieves an empty rectangle (sets all coordinates to zero).

GetUpdateRect(SafeHandle, NativeRectangle, Boolean) Retrieves the coordinates of the smallest rectangle that completely encloses the update region of the specified window.

GetUpdateRect(IntPtr, NativeRectangle, Boolean) retrieves the rectangle in logical coordinates. If there is no update region, GetUpdateRect(IntPtr, NativeRectangle, Boolean) retrieves an empty rectangle (sets all coordinates to zero).

GetUpdateRect(SafeHandle, Rectangle, Boolean) Retrieves the coordinates of the smallest rectangle that completely encloses the update region of the specified window.

GetUpdateRect(IntPtr, NativeRectangle, Boolean) retrieves the rectangle in logical coordinates. If there is no update region, GetUpdateRect(IntPtr, NativeRectangle, Boolean) retrieves an empty rectangle (sets all coordinates to zero).

GetUpdateRgn(IntPtr, IntPtr, Boolean) Retrieves the update region of a window by copying it into the specified region.

The coordinates of the update region are relative to the upper-left corner of the window (that is, they are client coordinates).

GetUpdateRgn(SafeHandle, SafeHandle, Boolean) Retrieves the update region of a window by copying it into the specified region.

The coordinates of the update region are relative to the upper-left corner of the window (that is, they are client coordinates).

GetWindow(IntPtr, GetWindowCmd) Retrieves a handle to a window that has the specified relationship (Z-Order or owner) to the specified window.
GetWindow(SafeHandle, GetWindowCmd) Retrieves a handle to a window that has the specified relationship (Z-Order or owner) to the specified window.
GetWindowDC(IntPtr) Retrieves the device context (DC) for the entire window, including title bar, menus, and scroll bars.

A window device context permits painting anywhere in a window, because the origin of the device context is the upper-left corner of the window instead of the client area.

GetWindowDC(IntPtr) assigns default attributes to the window device context each time it retrieves the device context. Previous attributes are lost.

GetWindowDC(SafeHandle) Retrieves the device context (DC) for the entire window, including title bar, menus, and scroll bars.

A window device context permits painting anywhere in a window, because the origin of the device context is the upper-left corner of the window instead of the client area.

GetWindowDC(IntPtr) assigns default attributes to the window device context each time it retrieves the device context. Previous attributes are lost.

GetWindowDpiAwarenessContext Returns the DPI_AWARENESS_CONTEXT associated with a window.
GetWindowInfo(IntPtr, NativeWindowInfo) Retrieves information about the specified window.
GetWindowInfo(SafeHandle, NativeWindowInfo) Retrieves information about the specified window.
GetWindowLong(HandleRef, WindowLongValues) Retrieves information about the specified window.

The function also retrieves the 32-bit (DWORD) value at the specified offset into the extra window memory.
Obsolete.

GetWindowLong(IntPtr, WindowLongValues) Retrieves information about the specified window.

The function also retrieves the 32-bit (DWORD) value at the specified offset into the extra window memory.
Obsolete.

GetWindowLong(SafeHandle, WindowLongValues) Retrieves information about the specified window.

The function also retrieves the 32-bit (DWORD) value at the specified offset into the extra window memory.
Obsolete.

GetWindowLongPtr(HandleRef, WindowLongValues) Retrieves information about the specified window.

The function also retrieves the value at a specified offset into the extra window memory.

GetWindowLongPtr(IntPtr, WindowLongValues) Retrieves information about the specified window.

The function also retrieves the value at a specified offset into the extra window memory.

GetWindowLongPtr(SafeHandle, WindowLongValues) Retrieves information about the specified window.

The function also retrieves the value at a specified offset into the extra window memory.

GetWindowModuleFileName(IntPtr, StringBuilder, UInt32) Retrieves the full path and file name of the module associated with the specified window handle.
GetWindowModuleFileName(SafeHandle, StringBuilder, UInt32) Retrieves the full path and file name of the module associated with the specified window handle.
GetWindowPlacement(IntPtr, WindowPlacement) Retrieves the show state and the restored, minimized, and maximized positions of the specified window.
GetWindowPlacement(SafeHandle, WindowPlacement) Retrieves the show state and the restored, minimized, and maximized positions of the specified window.
GetWindowRect(IntPtr, NativeRectangle) Retrieves the dimensions of the bounding rectangle of the specified window.

The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.

GetWindowRect(IntPtr, Rectangle) Retrieves the dimensions of the bounding rectangle of the specified window.

The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.

GetWindowRect(SafeHandle, NativeRectangle) Retrieves the dimensions of the bounding rectangle of the specified window.

The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.

GetWindowRect(SafeHandle, Rectangle) Retrieves the dimensions of the bounding rectangle of the specified window.

The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.

GetWindowRgn(IntPtr, IntPtr) Obtains a copy of the window region of a window.

The window region of a window is set by calling the SetWindowRgn function.

The window region determines the area within the window where the system permits drawing.

The system does not display any portion of a window that lies outside of the window region.

GetWindowRgn(SafeHandle, SafeHandle) Obtains a copy of the window region of a window.

The window region of a window is set by calling the SetWindowRgn function.

The window region determines the area within the window where the system permits drawing.

The system does not display any portion of a window that lies outside of the window region.

GetWindowRgnBox(IntPtr, NativeRectangle) Retrieves the dimensions of the tightest bounding rectangle for the window region of a window..
GetWindowRgnBox(IntPtr, Rectangle) Retrieves the dimensions of the tightest bounding rectangle for the window region of a window..
GetWindowRgnBox(SafeHandle, NativeRectangle) Retrieves the dimensions of the tightest bounding rectangle for the window region of a window..
GetWindowRgnBox(SafeHandle, Rectangle) Retrieves the dimensions of the tightest bounding rectangle for the window region of a window..
GetWindowText(IntPtr, StringBuilder, Int32) Copies the text of the specified window's title bar (if it has one) into a buffer.

If the specified window is a control, the text of the control is copied.

GetWindowText(IntPtr, StringBuilder, Int32) cannot retrieve the text of a control in another application than the calling application.

GetWindowText(SafeHandle, StringBuilder, Int32) Copies the text of the specified window's title bar (if it has one) into a buffer.

If the specified window is a control, the text of the control is copied.

GetWindowText(IntPtr, StringBuilder, Int32) cannot retrieve the text of a control in another application than the calling application.

GetWindowTextLength Retrieves the length, in characters, of the specified window's title bar text (if the window has a title bar).

If the specified window is a control, the function retrieves the length of the text within the control. However, GetWindowTextLength(IntPtr) cannot retrieve the length of the text of an edit control in another application.

GetWindowThreadProcessId(IntPtr, Int32) Retrieves the identifier of the thread that created the specified window and, optionally, the identifier of the process that created the window.
GetWindowThreadProcessId(SafeHandle, Int32) Retrieves the identifier of the thread that created the specified window and, optionally, the identifier of the process that created the window.
GhostWindowFromHungWindow Returns the handle on the window being ghosted.

This function is the reciprocal of HungWindowFromGhostWindow(IntPtr).

HideCaret(IntPtr) Removes the caret from the screen.

Hiding a caret does not destroy its current shape or invalidate the insertion point.

HideCaret(SafeHandle) Removes the caret from the screen.

Hiding a caret does not destroy its current shape or invalidate the insertion point.

HungWindowFromGhostWindow Returns the handle on the window being ghosted.

This function is the reciprocal of GhostWindowFromHungWindow(IntPtr).

InflateRect(NativeRectangle, Int32, Int32) Increases or decreases the width and height of the specified NativeRectangle.

The InflateRect(NativeRectangle, Int32, Int32) function adds 'x' units to the left and right ends of the NativeRectangle and 'y' units to the top and bottom.

The x and y parameters are signed values; positive values increase the width and height, and negative values decrease them.

InflateRect(Rectangle, Int32, Int32) Increases or decreases the width and height of the specified NativeRectangle.

The InflateRect(NativeRectangle, Int32, Int32) function adds 'x' units to the left and right ends of the NativeRectangle and 'y' units to the top and bottom.

The x and y parameters are signed values; positive values increase the width and height, and negative values decrease them.

InsertMenuItem(IntPtr, Int32, Boolean, MenuItemInfo) Insert a menu item into an existing menu.
InsertMenuItem(SafeHandle, Int32, Boolean, MenuItemInfo) Insert a menu item into an existing menu.
InternalGetWindowText Copies the text of the specified window's title bar (if it has one) into a buffer.

This function is similar to the GetWindowText(IntPtr, StringBuilder, Int32) function. However, it obtains the window text directly from the window structure associated with the specified window's handle and then always provides the text as a Unicode string.

This is unlike GetWindowText(IntPtr, StringBuilder, Int32) which obtains the text by sending the window a WM_GetText message.

If the specified window is a control, the text of the control is obtained.

IntersectRect Calculates the intersection of two source NativeRectangle and places the coordinates of the intersection NativeRectangle into the destination NativeRectangle.

If the source NativeRectangle do not intersect, an empty NativeRectangle (in which all coordinates are set to zero) is placed into the destination NativeRectangle.

InvalidateRect(IntPtr, NativeRectangle, Boolean) Adds a rectangle to the specified window's update region.

The update region represents the portion of the window's client area that must be redrawn.

InvalidateRect(IntPtr, Rectangle, Boolean) Adds a rectangle to the specified window's update region.

The update region represents the portion of the window's client area that must be redrawn.

InvalidateRect(IntPtr, IntPtr, Boolean) Adds a rectangle to the specified window's update region.

The update region represents the portion of the window's client area that must be redrawn.

InvalidateRect(SafeHandle, NativeRectangle, Boolean) Adds a rectangle to the specified window's update region.

The update region represents the portion of the window's client area that must be redrawn.

InvalidateRect(SafeHandle, Rectangle, Boolean) Adds a rectangle to the specified window's update region.

The update region represents the portion of the window's client area that must be redrawn.

InvalidateRect(SafeHandle, IntPtr, Boolean) Adds a rectangle to the specified window's update region.

The update region represents the portion of the window's client area that must be redrawn.

InvalidateRgn(IntPtr, IntPtr, Boolean) Invalidates the client area within the specified region by adding it to the current update region of a window.

The invalidated region, along with all other areas in the update region, is marked for painting when the next WM_Paint message occurs.

InvalidateRgn(SafeHandle, SafeHandle, Boolean) Invalidates the client area within the specified region by adding it to the current update region of a window.

The invalidated region, along with all other areas in the update region, is marked for painting when the next WM_Paint message occurs.

InvertRect(IntPtr, NativeRectangle) Inverts a NativeRectangle in a window by performing a logical NOT operation on the color values for each pixel in the rectangle's interior.
InvertRect(IntPtr, Rectangle) Inverts a NativeRectangle in a window by performing a logical NOT operation on the color values for each pixel in the rectangle's interior.
IsChild Determines whether a window is a child window or descendant window of a specified parent window.

A child window is the direct descendant of a specified parent window if that parent window is in the chain of parent windows; the chain of parent windows leads from the original overlapped or pop-up window to the child window.

IsDialogMessage Determines whether a message is intended for the specified dialog box and, if it is, processes the message.
IsGuiThread Determines whether the calling thread is already a GUI thread.

It can also optionally convert the thread to a GUI thread.

IsHungAppWindow(IntPtr) Determines whether the system considers that a specified application is not responding. An application is considered to be not responding if it is not waiting for input, is not in startup processing, and has not called PeekMessage within the internal timeout period of 5 seconds.
IsHungAppWindow(SafeHandle) Determines whether the system considers that a specified application is not responding. An application is considered to be not responding if it is not waiting for input, is not in startup processing, and has not called PeekMessage within the internal timeout period of 5 seconds.
IsIconic(IntPtr) Determines whether the specified window is minimized (iconic).
IsIconic(SafeHandle) Determines whether the specified window is minimized (iconic).
IsImmersiveProcess Determines whether the process belongs to a Windows Store app.
IsMenu(IntPtr) Determines whether a handle is a menu handle.
IsMenu(SafeHandle) Determines whether a handle is a menu handle.
IsMouseInPointerEnabled Indicates whether EnableMouseInPointer(Boolean) is set for the mouse to act as a pointer input device and send WM_POINTER* messages.
IsProcessDPIAware Determines whether the current process is dots per inch (dpi) aware such that it adjusts the sizes of UI elements to compensate for the dpi setting.
IsRectEmpty(NativeRectangle) determines whether the specified NativeRectangle is empty. An empty NativeRectangle is one that has no area; that is, the coordinate of the right side is less than or equal to the coordinate of the left side, or the coordinate of the bottom side is less than or equal to the coordinate of the top side.
IsRectEmpty(Rectangle) determines whether the specified NativeRectangle is empty. An empty NativeRectangle is one that has no area; that is, the coordinate of the right side is less than or equal to the coordinate of the left side, or the coordinate of the bottom side is less than or equal to the coordinate of the top side.
IsValidDpiAwarenessContext Determines if a specified DPI_AWARENESS_CONTEXT is valid and supported by the current system.
IsWindow(IntPtr) Determines whether the specified window handle identifies an existing window.
IsWindow(SafeHandle) Determines whether the specified window handle identifies an existing window.
IsWindowEnabled(IntPtr) Determines whether the specified window is enabled for mouse and keyboard input.
IsWindowEnabled(SafeHandle) Determines whether the specified window is enabled for mouse and keyboard input.
IsWindowUnicode Determines whether the specified window is a native Unicode window.
IsWindowVisible(IntPtr) Determines the visibility state of the specified window.
IsWindowVisible(SafeHandle) Determines the visibility state of the specified window.
IsWinEventHookInstalled Determines whether there is an installed WinEvent hook that might be notified of a specified event.
IsWow64Message Determines whether the last message read from the current thread's queue originated from a WOW64 process.
IsZoomed(IntPtr) Determines whether a window is maximized.
IsZoomed(SafeHandle) Determines whether a window is maximized.
KeybdEvent(Byte, Byte, KeybdEventFlags, UIntPtr) Synthesizes a keystroke.

The system can use such a synthesized keystroke to generate a WM_KeyDown or WM_KeyUp message.

The keyboard driver's interrupt handler calls the KeybdEvent(VirtualKeys, Byte, KeybdEventFlags, UIntPtr) function.

KeybdEvent(VirtualKeys, Byte, KeybdEventFlags, UIntPtr) Synthesizes a keystroke.

The system can use such a synthesized keystroke to generate a WM_KeyDown or WM_KeyUp message.

The keyboard driver's interrupt handler calls the KeybdEvent(VirtualKeys, Byte, KeybdEventFlags, UIntPtr) function.

LoadCursor Loads the specified cursor resource from the executable (.EXE) file associated with an application instance.

Note: This function has been superseded by the LoadImage(IntPtr, String, LoadImageType, Int32, Int32, LoadImageFlags) function.

LoadCursorFromFile Creates a cursor based on data contained in a file.
LoadIcon Loads the specified icon resource from the executable (.exe) file associated with an application instance.
LoadImage Loads an icon, cursor, animated cursor, or bitmap.
LoadKeyboardLayout Loads a new input locale identifier (formerly called the keyboard layout) into the system.
LoadString Loads a string resource from the executable file associated with a specified module, copies the string into a buffer, and appends a terminating null character.
LockSetForegroundWindow The foreground process can call this function to disable calls to the SetForegroundWindow(IntPtr) function.
LockWindowUpdate Disables or enables drawing in the specified window. Only one window can be locked at a time.
LockWorkStation Locks the workstation's display.

Locking a workstation protects it from unauthorized use.

LogicalToPhysicalPoint Converts the logical coordinates of a point in a window to physical coordinates.
MapDialogRect(IntPtr, NativeRectangle) Converts the specified dialog box units to screen units (pixels).

The function replaces the coordinates in the specified NativeRectangle structure with the converted coordinates, which allows the structure to be used to create a dialog box or position a control within a dialog box.

MapDialogRect(IntPtr, Rectangle) Converts the specified dialog box units to screen units (pixels).

The function replaces the coordinates in the specified Rectangle structure with the converted coordinates, which allows the structure to be used to create a dialog box or position a control within a dialog box.

MapVirtualKey Translates (maps) a virtual-key code into a scan code or character value, or translates a scan code into a virtual-key code.

To specify a handle to the keyboard layout to use for translating the specified code, use the MapVirtualKeyEx(UInt32, VirtualKeyMappingTypes, IntPtr) function.

MapVirtualKeyEx Translates (maps) a virtual-key code into a scan code or character value, or translates a scan code into a virtual-key code.

The function translates the codes using the input language and an input locale identifier.

MapWindowPoints(IntPtr, IntPtr, NativePoint, UInt32) Converts (maps) a set of points from a coordinate space relative to one window to a coordinate space relative to another window.
MapWindowPoints(IntPtr, IntPtr, NativeRectangle, UInt32) Converts (maps) a set of points from a coordinate space relative to one window to a coordinate space relative to another window.
MapWindowPoints(IntPtr, IntPtr, Point, UInt32) Converts (maps) a set of points from a coordinate space relative to one window to a coordinate space relative to another window.
MapWindowPoints(IntPtr, IntPtr, Rectangle, UInt32) Converts (maps) a set of points from a coordinate space relative to one window to a coordinate space relative to another window.
MapWindowPoints(SafeHandle, SafeHandle, NativePoint, UInt32) Converts (maps) a set of points from a coordinate space relative to one window to a coordinate space relative to another window.
MapWindowPoints(SafeHandle, SafeHandle, NativeRectangle, UInt32) Converts (maps) a set of points from a coordinate space relative to one window to a coordinate space relative to another window.
MapWindowPoints(SafeHandle, SafeHandle, Point, UInt32) Converts (maps) a set of points from a coordinate space relative to one window to a coordinate space relative to another window.
MapWindowPoints(SafeHandle, SafeHandle, Rectangle, UInt32) Converts (maps) a set of points from a coordinate space relative to one window to a coordinate space relative to another window.
MessageBeep Plays a waveform sound.

The waveform sound for each sound type is identified by an entry in the registry.

MonitorFromPoint(NativePoint, MonitorFromFlags) Retrieves a handle to the display monitor that contains a specified point.
MonitorFromPoint(Point, MonitorFromFlags) Retrieves a handle to the display monitor that contains a specified point.
MonitorFromRect(NativeRectangle, MonitorFromFlags) Retrieves a handle to the display monitor that has the largest area of intersection with a specified rectangle.
MonitorFromRect(Rectangle, MonitorFromFlags) Retrieves a handle to the display monitor that has the largest area of intersection with a specified rectangle.
MonitorFromWindow(IntPtr, MonitorFromFlags) Retrieves a handle to the display monitor that has the largest area of intersection with the bounding rectangle of a specified window.
MonitorFromWindow(SafeHandle, MonitorFromFlags) Retrieves a handle to the display monitor that has the largest area of intersection with the bounding rectangle of a specified window.
MouseEvent Synthesizes mouse motion and button clicks.
Obsolete.
MoveWindow(IntPtr, Int32, Int32, Int32, Int32, Boolean) Changes the position and dimensions of the specified window.

For a top-level window, the position and dimensions are relative to the upper-left corner of the screen.

For a child window, they are relative to the upper-left corner of the parent window's client area.

MoveWindow(SafeHandle, Int32, Int32, Int32, Int32, Boolean) Changes the position and dimensions of the specified window.

For a top-level window, the position and dimensions are relative to the upper-left corner of the screen.

For a child window, they are relative to the upper-left corner of the parent window's client area.

NotifyWinEvent Signals the system that a predefined event occurred.

If any client applications have registered a hook function for the event, the system calls the client's hook function.

OffsetRect(NativeRectangle, Int32, Int32) Moves the specified NativeRectangle by the specified offsets.
OffsetRect(Rectangle, Int32, Int32) Moves the specified Rectangle by the specified offsets.
OpenClipboard Opens the clipboard for examination and prevents other applications from modifying the clipboard content.
OpenIcon(IntPtr) Restores a minimized (iconic) window to its previous size and position; it then activates the window.
OpenIcon(SafeHandle) Restores a minimized (iconic) window to its previous size and position; it then activates the window.
OpenIconicWindow(IntPtr) Restores a minimized (iconic) window to its previous size and position; it then activates the window.
OpenIconicWindow(SafeHandle) Restores a minimized (iconic) window to its previous size and position; it then activates the window.
PeekMessage(NativeMessage, IntPtr, UInt32, UInt32, PeekMessageFlags) Dispatches incoming sent messages, checks the thread message queue for a posted message, and retrieves the message (if any exist).
PeekMessage(NativeMessage, HandleRef, UInt32, UInt32, PeekMessageFlags) Dispatches incoming sent messages, checks the thread message queue for a posted message, and retrieves the message (if any exist).
PhysicalToLogicalPoint(IntPtr, NativePoint) Converts the physical coordinates of a point in a window to logical coordinates.
PhysicalToLogicalPoint(IntPtr, Point) Converts the physical coordinates of a point in a window to logical coordinates.
PostMessage(HandleRef, EditControlMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified edit-control (typically a TextBox) and returns without waiting for the thread to process the message.
PostMessage(HandleRef, ListBoxMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified ListBox control and returns without waiting for the thread to process the message.
PostMessage(HandleRef, ListViewMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified ListView control and returns without waiting for the thread to process the message.
PostMessage(HandleRef, ProgressBarMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified ProgressBar control and returns without waiting for the thread to process the message.
PostMessage(HandleRef, ToolbarMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified ToolBar control and returns without waiting for the thread to process the message.
PostMessage(HandleRef, WindowMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(HandleRef, WindowMessages, IntPtr, String) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(HandleRef, WindowMessages, IntPtr, StringBuilder) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(HandleRef, Int32, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(HandleRef, Int32, IntPtr, String) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(HandleRef, Int32, IntPtr, StringBuilder) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(IntPtr, EditControlMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified edit-control (typically a TextBox) and returns without waiting for the thread to process the message.
PostMessage(IntPtr, ListBoxMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified ListBox control and returns without waiting for the thread to process the message.
PostMessage(IntPtr, ListViewMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified ListView control and returns without waiting for the thread to process the message.
PostMessage(IntPtr, ProgressBarMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified ProgressBar control and returns without waiting for the thread to process the message.
PostMessage(IntPtr, ToolbarMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified ToolBar control and returns without waiting for the thread to process the message.
PostMessage(IntPtr, WindowMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(IntPtr, WindowMessages, IntPtr, String) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(IntPtr, WindowMessages, IntPtr, StringBuilder) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(IntPtr, Int32, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(IntPtr, Int32, IntPtr, String) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(IntPtr, Int32, IntPtr, StringBuilder) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(SafeHandle, EditControlMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified edit-control (typically a TextBox) and returns without waiting for the thread to process the message.
PostMessage(SafeHandle, ListBoxMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified ListBox control and returns without waiting for the thread to process the message.
PostMessage(SafeHandle, ListViewMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified ListView control and returns without waiting for the thread to process the message.
PostMessage(SafeHandle, ProgressBarMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified ProgressBar control and returns without waiting for the thread to process the message.
PostMessage(SafeHandle, ToolbarMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified ToolBar control and returns without waiting for the thread to process the message.
PostMessage(SafeHandle, WindowMessages, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(SafeHandle, WindowMessages, IntPtr, String) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(SafeHandle, WindowMessages, IntPtr, StringBuilder) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(SafeHandle, Int32, IntPtr, IntPtr) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(SafeHandle, Int32, IntPtr, String) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostMessage(SafeHandle, Int32, IntPtr, StringBuilder) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
PostQuitMessage Indicates to the system that a thread has made a request to terminate (quit).

It is typically used in response to a WM_Destroy message.

PostThreadMessage(Int32, WindowMessages, IntPtr, IntPtr) Places (posts) a message to the message queue of the specified thread.

It returns without waiting for the thread to process the message.

PostThreadMessage(Int32, Int32, IntPtr, IntPtr) Places (posts) a message to the message queue of the specified thread.

It returns without waiting for the thread to process the message.

PtInRect(NativeRectangle, NativePoint) Determines whether the specified point lies within the specified rectangle.

A point is within a rectangle if it lies on the left or top side or is within all four sides.

A point on the right or bottom side is considered outside the rectangle.

PtInRect(Rectangle, Point) Determines whether the specified point lies within the specified rectangle.

A point is within a rectangle if it lies on the left or top side or is within all four sides.

A point on the right or bottom side is considered outside the rectangle.

QueryDisplayConfig(QueryDisplayConfigFlags, UInt32, DisplayConfigPathInfo, UInt32, DisplayConfigModeInfo, DisplayConfigTopologyId) Retrieves information about all possible display paths for all display devices, or views, in the current setting.
QueryDisplayConfig(QueryDisplayConfigFlags, UInt32, DisplayConfigPathInfo, UInt32, DisplayConfigModeInfo, IntPtr) Retrieves information about all possible display paths for all display devices, or views, in the current setting.
RealChildWindowFromPoint(IntPtr, NativePoint) Retrieves a handle to the child window at the specified point.

The search is restricted to immediate child windows; grandchildren and deeper descendant windows are not searched.

RealChildWindowFromPoint(IntPtr, Point) Retrieves a handle to the child window at the specified point.

The search is restricted to immediate child windows; grandchildren and deeper descendant windows are not searched.

RealGetWindowClass Retrieves a string that specifies the window type.
RedrawWindow(IntPtr, NativeRectangle, IntPtr, RedrawWindowFlags) Updates the specified rectangle or region in a window's client area.
RedrawWindow(IntPtr, Rectangle, IntPtr, RedrawWindowFlags) Updates the specified rectangle or region in a window's client area.
RedrawWindow(IntPtr, IntPtr, IntPtr, RedrawWindowFlags) Updates the specified rectangle or region in a window's client area.
RedrawWindow(SafeHandle, NativeRectangle, IntPtr, RedrawWindowFlags) Updates the specified rectangle or region in a window's client area.
RedrawWindow(SafeHandle, Rectangle, IntPtr, RedrawWindowFlags) Updates the specified rectangle or region in a window's client area.
RedrawWindow(SafeHandle, IntPtr, IntPtr, RedrawWindowFlags) Updates the specified rectangle or region in a window's client area.
RegisterHotKey(IntPtr, Int32, UInt32, UInt32) Defines a system-wide hotkey.
RegisterHotKey(SafeHandle, Int32, UInt32, UInt32) Defines a system-wide hotkey.
RegisterRawInputDevices Registers the devices that supply the raw input data.
RegisterWindowMessage Defines a new window message that is guaranteed to be unique throughout the system.

The message value can be used when sending or posting messages.

ReleaseCapture Releases the mouse capture from a window in the current thread and restores normal mouse input processing.

A window that has captured the mouse receives all mouse input, regardless of the position of the cursor, except when a mouse button is clicked while the cursor hot spot is in the window of another thread.

ReleaseDC(IntPtr, IntPtr) Releases a device context (DC), freeing it for use by other applications.

The effect of the ReleaseDC(IntPtr, IntPtr) function depends on the type of DC. It frees only common and window DCs. It has no effect on class or private DCs.

ReleaseDC(SafeHandle, IntPtr) Releases a device context (DC), freeing it for use by other applications.

The effect of the ReleaseDC(IntPtr, IntPtr) function depends on the type of DC. It frees only common and window DCs. It has no effect on class or private DCs.

ReplyMessage Replies to a message sent from another thread by the SendMessage(IntPtr, EditControlMessages, IntPtr, IntPtr) function.
ScreenToClient(IntPtr, NativePoint) Converts the screen coordinates of a specified point on the screen to client-area coordinates.
ScreenToClient(IntPtr, Point) Converts the screen coordinates of a specified point on the screen to client-area coordinates.
ScreenToClient(SafeHandle, NativePoint) Converts the screen coordinates of a specified point on the screen to client-area coordinates.
ScreenToClient(SafeHandle, Point) Converts the screen coordinates of a specified point on the screen to client-area coordinates.
SendInput Synthesizes keystrokes, mouse motions, and button clicks.
SendMessage(HandleRef, EditControlMessages, IntPtr, IntPtr) Sends the specified message to a edit-control (typically a TextBox).

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(HandleRef, ListBoxMessages, IntPtr, IntPtr) Sends the specified message to a ListBox control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(HandleRef, ListViewMessages, IntPtr, IntPtr) Sends the specified message to a ListView control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(HandleRef, ProgressBarMessages, IntPtr, IntPtr) Sends the specified message to a ProgressBar control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(HandleRef, ToolbarMessages, IntPtr, IntPtr) Sends the specified message to a ToolBar control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(HandleRef, ToolbarMessages, IntPtr, String) Sends the specified message to a ToolBar control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(HandleRef, ToolbarMessages, IntPtr, StringBuilder) Sends the specified message to a ToolBar control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(HandleRef, WindowMessages, IntPtr, Point) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(HandleRef, WindowMessages, IntPtr, IntPtr) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(HandleRef, WindowMessages, IntPtr, String) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(HandleRef, WindowMessages, IntPtr, StringBuilder) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(HandleRef, Int32, IntPtr, Point) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(HandleRef, Int32, IntPtr, IntPtr) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(HandleRef, Int32, IntPtr, String) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(HandleRef, Int32, IntPtr, StringBuilder) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(IntPtr, EditControlMessages, IntPtr, IntPtr) Sends the specified message to a edit-control (typically a TextBox).

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(IntPtr, ListBoxMessages, IntPtr, IntPtr) Sends the specified message to a ListBox control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(IntPtr, ListViewMessages, IntPtr, IntPtr) Sends the specified message to a ListView control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(IntPtr, ProgressBarMessages, IntPtr, IntPtr) Sends the specified message to a ProgressBar control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(IntPtr, ToolbarMessages, IntPtr, IntPtr) Sends the specified message to a ToolBar control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(IntPtr, ToolbarMessages, IntPtr, String) Sends the specified message to a ToolBar control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(IntPtr, ToolbarMessages, IntPtr, StringBuilder) Sends the specified message to a ToolBar control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(IntPtr, WindowMessages, IntPtr, Point) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(IntPtr, WindowMessages, IntPtr, IntPtr) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(IntPtr, WindowMessages, IntPtr, String) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(IntPtr, WindowMessages, IntPtr, StringBuilder) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(IntPtr, Int32, IntPtr, Point) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(IntPtr, Int32, IntPtr, IntPtr) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(IntPtr, Int32, IntPtr, String) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(IntPtr, Int32, IntPtr, StringBuilder) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(SafeHandle, EditControlMessages, IntPtr, IntPtr) Sends the specified message to a edit-control (typically a TextBox).

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(SafeHandle, ListBoxMessages, IntPtr, IntPtr) Sends the specified message to a ListBox control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(SafeHandle, ListViewMessages, IntPtr, IntPtr) Sends the specified message to a ListView control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(SafeHandle, ProgressBarMessages, IntPtr, IntPtr) Sends the specified message to a ProgressBar control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(SafeHandle, ToolbarMessages, IntPtr, IntPtr) Sends the specified message to a ToolBar control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(SafeHandle, ToolbarMessages, IntPtr, String) Sends the specified message to a ToolBar control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(SafeHandle, ToolbarMessages, IntPtr, StringBuilder) Sends the specified message to a ToolBar control.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(SafeHandle, WindowMessages, IntPtr, Point) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(SafeHandle, WindowMessages, IntPtr, IntPtr) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(SafeHandle, WindowMessages, IntPtr, String) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(SafeHandle, WindowMessages, IntPtr, StringBuilder) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(SafeHandle, Int32, IntPtr, Point) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(SafeHandle, Int32, IntPtr, IntPtr) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(SafeHandle, Int32, IntPtr, String) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage(SafeHandle, Int32, IntPtr, StringBuilder) Sends the specified message to a window or windows.

The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessageTimeout(HandleRef, EditControlMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a edit-control (typically a TextBox).
SendMessageTimeout(HandleRef, ListBoxMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a ListBox control.
SendMessageTimeout(HandleRef, ListViewMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a ListView control.
SendMessageTimeout(HandleRef, ProgressBarMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a ProgressBar control.
SendMessageTimeout(HandleRef, ToolbarMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a ToolBar control.
SendMessageTimeout(HandleRef, WindowMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(HandleRef, WindowMessages, IntPtr, String, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(HandleRef, WindowMessages, IntPtr, StringBuilder, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(HandleRef, Int32, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(HandleRef, Int32, IntPtr, String, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(HandleRef, Int32, IntPtr, StringBuilder, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(IntPtr, EditControlMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a edit-control (typically a TextBox).
SendMessageTimeout(IntPtr, ListBoxMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a ListBox control.
SendMessageTimeout(IntPtr, ListViewMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a ListView control.
SendMessageTimeout(IntPtr, ProgressBarMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a ProgressBar control.
SendMessageTimeout(IntPtr, ToolbarMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a ToolBar control.
SendMessageTimeout(IntPtr, WindowMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(IntPtr, WindowMessages, IntPtr, String, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(IntPtr, WindowMessages, IntPtr, StringBuilder, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(IntPtr, Int32, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(IntPtr, Int32, IntPtr, String, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(IntPtr, Int32, IntPtr, StringBuilder, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(SafeHandle, EditControlMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a edit-control (typically a TextBox).
SendMessageTimeout(SafeHandle, ListBoxMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a ListBox control.
SendMessageTimeout(SafeHandle, ListViewMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a ListView control.
SendMessageTimeout(SafeHandle, ProgressBarMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a ProgressBar control.
SendMessageTimeout(SafeHandle, ToolbarMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a ToolBar control.
SendMessageTimeout(SafeHandle, WindowMessages, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(SafeHandle, WindowMessages, IntPtr, String, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(SafeHandle, WindowMessages, IntPtr, StringBuilder, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(SafeHandle, Int32, IntPtr, IntPtr, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(SafeHandle, Int32, IntPtr, String, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendMessageTimeout(SafeHandle, Int32, IntPtr, StringBuilder, SendMessageTimeoutFlags, Int32, IntPtr) Sends the specified message to a window.
SendNotifyMessage(HandleRef, WindowMessages, IntPtr, IntPtr) Sends the specified message to a window or windows.

If the window was created by the calling thread, SendNotifyMessage(IntPtr, WindowMessages, IntPtr, IntPtr) calls the window procedure for the window and does not return until the window procedure has processed the message.

If the window was created by a different thread, SendNotifyMessage(IntPtr, WindowMessages, IntPtr, IntPtr) passes the message to the window procedure and returns immediately; it does not wait for the window procedure to finish processing the message.

SendNotifyMessage(HandleRef, UInt32, IntPtr, IntPtr) Sends the specified message to a window or windows.

If the window was created by the calling thread, SendNotifyMessage(IntPtr, WindowMessages, IntPtr, IntPtr) calls the window procedure for the window and does not return until the window procedure has processed the message.

If the window was created by a different thread, SendNotifyMessage(IntPtr, WindowMessages, IntPtr, IntPtr) passes the message to the window procedure and returns immediately; it does not wait for the window procedure to finish processing the message.

SendNotifyMessage(IntPtr, WindowMessages, IntPtr, IntPtr) Sends the specified message to a window or windows.

If the window was created by the calling thread, SendNotifyMessage(IntPtr, WindowMessages, IntPtr, IntPtr) calls the window procedure for the window and does not return until the window procedure has processed the message.

If the window was created by a different thread, SendNotifyMessage(IntPtr, WindowMessages, IntPtr, IntPtr) passes the message to the window procedure and returns immediately; it does not wait for the window procedure to finish processing the message.

SendNotifyMessage(IntPtr, UInt32, IntPtr, IntPtr) Sends the specified message to a window or windows.

If the window was created by the calling thread, SendNotifyMessage(IntPtr, WindowMessages, IntPtr, IntPtr) calls the window procedure for the window and does not return until the window procedure has processed the message.

If the window was created by a different thread, SendNotifyMessage(IntPtr, WindowMessages, IntPtr, IntPtr) passes the message to the window procedure and returns immediately; it does not wait for the window procedure to finish processing the message.

SetActiveWindow(IntPtr) Activates a window. The window must be attached to the calling thread's message queue.
SetActiveWindow(SafeHandle) Activates a window. The window must be attached to the calling thread's message queue.
SetCapture Sets the mouse capture to the specified window belonging to the current thread.

SetCapture(IntPtr) captures mouse input either when the mouse is over the capturing window, or when the mouse button was pressed while the mouse was over the capturing window and the button is still down.

Only one window at a time can capture the mouse.

If the mouse cursor is over a window created by another thread, the system will direct mouse input to the specified window only if a mouse button is down.

SetCaretBlinkTime Sets the caret blink time to the specified number of milliseconds.

The blink time is the elapsed time, in milliseconds, required to invert the caret's pixels.

SetCaretPos Moves the caret to the specified coordinates.

If the window that owns the caret was created with the CS_OWNDC class style, then the specified coordinates are subject to the mapping mode of the device context associated with that window.

SetClassLong(HandleRef, ClassLongValues, UInt32) Replaces the specified 32-bit (long) value at the specified offset into the extra class memory or the WNDCLASSEX structure for the class to which the specified window belongs.

Note: This function has been superseded by the SetClassLongPtr(IntPtr, ClassLongValues, IntPtr) function.

To write code that is compatible with both 32-bit and 64-bit versions of Windows, use SetClassLongPtr(IntPtr, ClassLongValues, IntPtr).
Obsolete.

SetClassLong(IntPtr, ClassLongValues, UInt32) Replaces the specified 32-bit (long) value at the specified offset into the extra class memory or the WNDCLASSEX structure for the class to which the specified window belongs.

Note: This function has been superseded by the SetClassLongPtr(IntPtr, ClassLongValues, IntPtr) function.

To write code that is compatible with both 32-bit and 64-bit versions of Windows, use SetClassLongPtr(IntPtr, ClassLongValues, IntPtr).
Obsolete.

SetClassLong(SafeHandle, ClassLongValues, UInt32) Replaces the specified 32-bit (long) value at the specified offset into the extra class memory or the WNDCLASSEX structure for the class to which the specified window belongs.

Note: This function has been superseded by the SetClassLongPtr(IntPtr, ClassLongValues, IntPtr) function.

To write code that is compatible with both 32-bit and 64-bit versions of Windows, use SetClassLongPtr(IntPtr, ClassLongValues, IntPtr).
Obsolete.

SetClassLongPtr(HandleRef, ClassLongValues, IntPtr) Replaces the specified value at the specified offset in the extra class memory or the WNDCLASSEX structure for the class to which the specified window belongs.
SetClassLongPtr(IntPtr, ClassLongValues, IntPtr) Replaces the specified value at the specified offset in the extra class memory or the WNDCLASSEX structure for the class to which the specified window belongs.
SetClassLongPtr(SafeHandle, ClassLongValues, IntPtr) Replaces the specified value at the specified offset in the extra class memory or the WNDCLASSEX structure for the class to which the specified window belongs.
SetCursor Sets the cursor shape.
SetCursorPos Moves the cursor to the specified screen coordinates.

If the new coordinates are not within the screen rectangle set by the most recent ClipCursor(NativeRectangle) function call, the system automatically adjusts the coordinates so that the cursor stays within the rectangle.

SetDisplayConfig Modifies the display topology, source, and target modes by exclusively enabling the specified paths in the current session.
SetDoubleClickTime Sets the double-click time for the mouse.

A double-click is a series of two clicks of the mouse button, the second occurring within a specified time after the first.

The double-click time is the maximum number of milliseconds that may occur between the first and second click of a double-click.

The maximum double-click time is 5000 milliseconds.

SetFocus Sets the keyboard focus to the specified window.

The window must be attached to the calling thread's message queue.

SetForegroundWindow(IntPtr) Brings the thread that created the specified window into the foreground and activates the window.

Keyboard input is directed to the window, and various visual cues are changed for the user.

The system assigns a slightly higher priority to the thread that created the foreground window than it does to other threads.

SetForegroundWindow(SafeHandle) Brings the thread that created the specified window into the foreground and activates the window.

Keyboard input is directed to the window, and various visual cues are changed for the user.

The system assigns a slightly higher priority to the thread that created the foreground window than it does to other threads.

SetKeyboardState Copies an array of keyboard key states into the calling thread's keyboard input-state table.

This is the same table accessed by the GetKeyboardState(Byte) and GetKeyState(VirtualKeys) functions.

Changes made to this table do not affect keyboard input to any other thread.

SetLayeredWindowAttributes(IntPtr, UInt32, Int32, LayeredWindowAttributesFlags) Sets the opacity and transparency color key of a layered window.
SetLayeredWindowAttributes(SafeHandle, UInt32, Int32, LayeredWindowAttributesFlags) Sets the opacity and transparency color key of a layered window.
SetMenuInfo(IntPtr, MenuInfo) Sets information for a specified menu.
SetMenuInfo(SafeHandle, MenuInfo) Sets information for a specified menu.
SetMenuItemBitmaps(IntPtr, UInt32, MenuPosition, SafeBitmapHandle, SafeBitmapHandle) Associates the specified bitmap with a menu item.

Whether the menu item is selected or clear, the system displays the appropriate bitmap next to the menu item.

SetMenuItemBitmaps(IntPtr, UInt32, MenuPosition, IntPtr, IntPtr) Associates the specified bitmap with a menu item.

Whether the menu item is selected or clear, the system displays the appropriate bitmap next to the menu item.

SetMenuItemBitmaps(SafeHandle, UInt32, MenuPosition, SafeBitmapHandle, SafeBitmapHandle) Associates the specified bitmap with a menu item.

Whether the menu item is selected or clear, the system displays the appropriate bitmap next to the menu item.

SetMenuItemBitmaps(SafeHandle, UInt32, MenuPosition, IntPtr, IntPtr) Associates the specified bitmap with a menu item.

Whether the menu item is selected or clear, the system displays the appropriate bitmap next to the menu item.

SetMenuItemInfo(IntPtr, UInt32, Boolean, MenuItemInfo) Changes information about a menu item.
SetMenuItemInfo(SafeHandle, UInt32, Boolean, MenuItemInfo) Changes information about a menu item.
SetMessageExtraInfo Sets the extra message information for the current thread.

Extra message information is an application- or driver-defined value associated with the current thread's message queue.

An application can use the GetMessageExtraInfo function to retrieve a thread's extra message information.

SetParent(HandleRef, IntPtr) Changes the parent window of the specified child window.
SetParent(HandleRef, HandleRef) Changes the parent window of the specified child window.
SetParent(IntPtr, IntPtr) Changes the parent window of the specified child window.
SetParent(SafeHandle, IntPtr) Changes the parent window of the specified child window.
SetParent(SafeHandle, SafeHandle) Changes the parent window of the specified child window.
SetPhysicalCursorPos Sets the position of the cursor in physical coordinates.
SetProcessDPIAware Sets the process-default DPI awareness to system-DPI awareness.

This is equivalent to calling SetProcessDpiAwarenessContext(IntPtr) with a DPI_AWARENESS_CONTEXT value of DPI_AWARENESS_CONTEXT_SYSTEM_AWARE.

SetProcessDpiAwarenessContext Sets the current process to a specified dots per inch (dpi) awareness context.

The DPI awareness contexts are from the DPI_AWARENESS_CONTEXT value.

SetProcessRestrictionExemption Exempts the calling process from restrictions preventing desktop processes from interacting with the Windows Store app environment. This function is used by development and debugging tools.

This function only succeeds if a developer license is present on the system. Once successful the calling process will be able to perform the following actions, subject to User Interface Privilege Isolation (UIPI) restrictions:

- Attach global hooks (and event hooks) to Windows Store app processes.

- Attach input queues between Windows Store app processes, Windows Store app browsers, system processes, and desktop application processes.

- Change foreground arbitrarily between the Windows Store app and desktop environments.

SetProcessWindowStation Assigns the specified window station to the calling process. This enables the process to access objects in the window station such as desktops, the clipboard, and global atoms.

All subsequent operations on the window station use the access rights granted to hWinSta.

SetRect(NativeRectangle, Int32, Int32, Int32, Int32) Sets the coordinates of the specified rectangle.

This is equivalent to assigning the left, top, right, and bottom arguments to the appropriate members of the NativeRectangle structure.

SetRect(Rectangle, Int32, Int32, Int32, Int32) Sets the coordinates of the specified rectangle.

This is equivalent to assigning the left, top, right, and bottom arguments to the appropriate members of the NativeRectangle structure.

SetRectEmpty(NativeRectangle) Creates an empty NativeRectangle in which all coordinates are set to zero.
SetRectEmpty(Rectangle) Creates an empty Rectangle in which all coordinates are set to zero.
SetScrollInfo(IntPtr, ScrollBarOrientation, ScrollInfo, Boolean) Sets the parameters of a scroll bar, including the minimum and maximum scrolling positions, the page size, and the position of the scroll box (thumb).

The function also redraws the scroll bar, if requested.

SetScrollInfo(SafeHandle, ScrollBarOrientation, ScrollInfo, Boolean) Sets the parameters of a scroll bar, including the minimum and maximum scrolling positions, the page size, and the position of the scroll box (thumb).

The function also redraws the scroll bar, if requested.

SetSysColors Sets the colors for the specified display elements.

Display elements are the various parts of a window and the display that appear on the system display screen.

SetSystemCursor Enables an application to customize the system cursors.

It replaces the contents of the system cursor specified by the parameter with the contents of the cursor specified by the parameter and then destroys .

SetThreadDesktop Assigns the specified desktop to the calling thread. All subsequent operations on the desktop use the access rights granted to the desktop.
SetThreadDpiAwarenessContext Set the DPI awareness for the current thread to the provided value.
SetWindowLong(HandleRef, WindowLongValues, UInt32) Changes an attribute of the specified window.

The function also sets the 32-bit (LONG) value at the specified offset into the extra window memory.
Obsolete.

SetWindowLong(IntPtr, WindowLongValues, UInt32) Changes an attribute of the specified window.

The function also sets the 32-bit (LONG) value at the specified offset into the extra window memory.
Obsolete.

SetWindowLong(SafeHandle, WindowLongValues, UInt32) Changes an attribute of the specified window.

The function also sets the 32-bit (LONG) value at the specified offset into the extra window memory.
Obsolete.

SetWindowLongPtr(HandleRef, WindowLongValues, IntPtr) Changes an attribute of the specified window.

The function also sets a value at the specified offset in the extra window memory.

SetWindowLongPtr(IntPtr, WindowLongValues, IntPtr) Changes an attribute of the specified window.

The function also sets a value at the specified offset in the extra window memory.

SetWindowLongPtr(SafeHandle, WindowLongValues, IntPtr) Changes an attribute of the specified window.

The function also sets a value at the specified offset in the extra window memory.

SetWindowPlacement(IntPtr, WindowPlacement) Sets the show state and the restored, minimized, and maximized positions of the specified window.
SetWindowPlacement(SafeHandle, WindowPlacement) Sets the show state and the restored, minimized, and maximized positions of the specified window.
SetWindowPos(IntPtr, IntPtr, Int32, Int32, Int32, Int32, SetWindowPosFlags) Changes the size, position, and Z order of a child, pop-up, or top-level window.

These windows are ordered according to their appearance on the screen.

The topmost window receives the highest rank and is the first window in the Z order.

SetWindowPos(SafeHandle, IntPtr, Int32, Int32, Int32, Int32, SetWindowPosFlags) Changes the size, position, and Z order of a child, pop-up, or top-level window.

These windows are ordered according to their appearance on the screen.

The topmost window receives the highest rank and is the first window in the Z order.

SetWindowRgn(IntPtr, IntPtr, Boolean) Sets the window region of a window.

The window region determines the area within the window where the system permits drawing.

The system does not display any portion of a window that lies outside of the window region

SetWindowRgn(SafeHandle, SafeHandle, Boolean) Sets the window region of a window.

The window region determines the area within the window where the system permits drawing.

The system does not display any portion of a window that lies outside of the window region

SetWindowsHookEx Installs an application-defined hook procedure into a hook chain.

You would install a hook procedure to monitor the system for certain types of events.

These events are associated either with a specific thread or with all threads in the same desktop as the calling thread.

SetWindowText(IntPtr, String) Changes the text of the specified window's title bar (if it has one).

If the specified window is a control, the text of the control is changed.

However, SetWindowText(IntPtr, String) cannot change the text of a control in another application.

SetWindowText(SafeHandle, String) Changes the text of the specified window's title bar (if it has one).

If the specified window is a control, the text of the control is changed.

However, SetWindowText(IntPtr, String) cannot change the text of a control in another application.

ShowCaret(IntPtr) Makes the caret visible on the screen at the caret's current position.

When the caret becomes visible, it begins flashing automatically.

ShowCaret(SafeHandle) Makes the caret visible on the screen at the caret's current position.

When the caret becomes visible, it begins flashing automatically.

ShowCursor Displays or hides the cursor.
ShowScrollBar(IntPtr, ScrollBarOrientation, Boolean) Shows or hides the specified scrollbar of a Control/Window.
ShowScrollBar(SafeHandle, ScrollBarOrientation, Boolean) Shows or hides the specified scrollbar of a Control/Window.
ShowWindow(IntPtr, NativeWindowState) Sets the specified window's show state.
ShowWindow(SafeHandle, NativeWindowState) Sets the specified window's show state.
ShowWindowAsync(IntPtr, NativeWindowState) Sets the specified window's show state.
ShowWindowAsync(SafeHandle, NativeWindowState) Sets the specified window's show state.
ShutdownBlockReasonCreate Indicates that the system cannot be shut down and sets a reason string to be displayed to the user if system shutdown is initiated.
ShutdownBlockReasonDestroy Indicates that the system can be shut down and frees the reason string.
ShutdownBlockReasonQuery Retrieves the reason string set by the ShutdownBlockReasonCreate(IntPtr, String) function.
SoundSentry Triggers a visual signal to indicate that a sound is playing.
SubtractRect(NativeRectangle, NativeRectangle, NativeRectangle) Determines the coordinates of a NativeRectangle formed by subtracting one NativeRectangle from another.

The function only subtracts the NativeRectangle specified by refSrcRect2 from the NativeRectangle specified by refSrcRect1 when the rectangles intersect completely in either the x- or y- direction.

For example, if refSrcRect1 has the coordinates {10, 10, 100, 100} and refSrcRect2 has the coordinates {50, 50, 150, 150}, the function sets the coordinates of the NativeRectangle pointed to by refDstRect to {10, 10, 100, 100}.

If refSrcRect1 has the coordinates {10, 10, 100, 100} and refSrcRect2 has the coordinates {50, 10, 150, 150}, however, the function sets the coordinates of the NativeRectangle pointed to by refDstRect to {10, 10, 50, 100}.

In other words, the resulting NativeRectangle is the bounding box of the geometric difference.

SubtractRect(Rectangle, Rectangle, Rectangle) Determines the coordinates of a Rectangle formed by subtracting one Rectangle from another.

The function only subtracts the Rectangle specified by refSrcRect2 from the Rectangle specified by refSrcRect1 when the rectangles intersect completely in either the x- or y- direction.

For example, if refSrcRect1 has the coordinates {10, 10, 100, 100} and refSrcRect2 has the coordinates {50, 50, 150, 150}, the function sets the coordinates of the Rectangle pointed to by refDstRect to {10, 10, 100, 100}.

If refSrcRect1 has the coordinates {10, 10, 100, 100} and refSrcRect2 has the coordinates {50, 10, 150, 150}, however, the function sets the coordinates of the Rectangle pointed to by refDstRect to {10, 10, 50, 100}.

In other words, the resulting Rectangle is the bounding box of the geometric difference.

SwapMouseButton Reverses or restores the meaning of the left and right mouse buttons.
SwitchDesktop Makes the specified desktop visible and activates it. This enables the desktop to receive input from the user.

The calling process must have DESKTOP_SWITCHDESKTOP access to the desktop for the SwitchDesktop(IntPtr) function to succeed.

SwitchToThisWindow(IntPtr, Boolean) Switches focus to the specified window and brings it to the foreground.
SwitchToThisWindow(SafeHandle, Boolean) Switches focus to the specified window and brings it to the foreground.
SystemParametersInfo(SystemParametersActionFlags, Boolean, Boolean, SystemParametersWinIniFlags) Retrieves or sets the value of one of the system-wide parameters.

This function can also update the user profile while setting a parameter.

SystemParametersInfo(SystemParametersActionFlags, Boolean, UInt32, SystemParametersWinIniFlags) Retrieves or sets the value of one of the system-wide parameters.

This function can also update the user profile while setting a parameter.

SystemParametersInfo(SystemParametersActionFlags, Int32, UInt32, SystemParametersWinIniFlags) Retrieves or sets the value of one of the system-wide parameters.

This function can also update the user profile while setting a parameter.

SystemParametersInfo(SystemParametersActionFlags, UInt32, Boolean, SystemParametersWinIniFlags) Retrieves or sets the value of one of the system-wide parameters.

This function can also update the user profile while setting a parameter.

SystemParametersInfo(SystemParametersActionFlags, UInt32, Int64, SystemParametersWinIniFlags) Retrieves or sets the value of one of the system-wide parameters.

This function can also update the user profile while setting a parameter.

SystemParametersInfo(SystemParametersActionFlags, UInt32, String, SystemParametersWinIniFlags) Retrieves or sets the value of one of the system-wide parameters.

This function can also update the user profile while setting a parameter.

SystemParametersInfo(SystemParametersActionFlags, UInt32, StringBuilder, SystemParametersWinIniFlags) Retrieves or sets the value of one of the system-wide parameters.

This function can also update the user profile while setting a parameter.

SystemParametersInfo(SystemParametersActionFlags, UInt32, UInt32, SystemParametersWinIniFlags) Retrieves or sets the value of one of the system-wide parameters.

This function can also update the user profile while setting a parameter.

SystemParametersInfo(SystemParametersActionFlags, UInt32, UInt64, SystemParametersWinIniFlags) Retrieves or sets the value of one of the system-wide parameters.

This function can also update the user profile while setting a parameter.

ToAscii Translates the specified virtual-key code and keyboard state to the corresponding character or characters.

The function translates the code using the input language and physical keyboard layout identified by the keyboard layout handle.

To specify a handle to the keyboard layout to use to translate the specified code, use the ToAsciiEx(UInt32, UInt32, Byte, UInt32, UInt32, IntPtr) function.

ToAsciiEx Translates the specified virtual-key code and keyboard state to the corresponding character or characters.

The function translates the code using the input language and physical keyboard layout identified by the input locale identifier.

ToString Returns a string that represents the current object.
(Inherited from Object)
ToUnicodeEx Translates the specified virtual-key code and keyboard state to the corresponding Unicode character or characters.
TrackPopupMenu Displays a shortcut menu at the specified location and tracks the selection of items on the menu. The shortcut menu can appear anywhere on the screen..
TranslateMessage Translates virtual-key messages into character messages. The character messages are posted to the calling thread's message queue, to be read the next time the thread calls the GetMessage(NativeMessage, IntPtr, UInt32, UInt32) or PeekMessage(NativeMessage, IntPtr, UInt32, UInt32, PeekMessageFlags) function.
UnhookWindowsHookEx Removes a hook procedure installed in a hook chain by the SetWindowsHookEx(HookType, DelegatesHookProc, IntPtr, UInt32) function.
UnionRect(NativeRectangle, NativeRectangle, NativeRectangle) Creates the union of two rectangles. The union is the smallest rectangle that contains both source rectangles.
UnionRect(Rectangle, Rectangle, Rectangle) Creates the union of two rectangles. The union is the smallest rectangle that contains both source rectangles.
UnloadKeyboardLayout Unloads an input locale identifier (formerly called a keyboard layout).
UnregisterHotKey(IntPtr, Int32) Unregisters a hotkey previously registered with RegisterHotKey(IntPtr, Int32, UInt32, UInt32) function.
UnregisterHotKey(SafeHandle, Int32) Unregisters a hotkey previously registered with RegisterHotKey(IntPtr, Int32, UInt32, UInt32) function.
UpdateLayeredWindow(IntPtr, IntPtr, NativePoint, NativeSize, IntPtr, NativePoint, Int32, BlendFunction, UpdateLayeredWindowflags) Updates the position, size, shape, content, and translucency of a layered window.
UpdateLayeredWindow(IntPtr, IntPtr, Point, Size, IntPtr, Point, Int32, BlendFunction, UpdateLayeredWindowflags) Updates the position, size, shape, content, and translucency of a layered window.
UpdateLayeredWindow(SafeHandle, IntPtr, NativePoint, NativeSize, IntPtr, NativePoint, Int32, BlendFunction, UpdateLayeredWindowflags) Updates the position, size, shape, content, and translucency of a layered window.
UpdateLayeredWindow(SafeHandle, IntPtr, Point, Size, IntPtr, Point, Int32, BlendFunction, UpdateLayeredWindowflags) Updates the position, size, shape, content, and translucency of a layered window.
UpdateWindow(IntPtr) Updates the client area of the specified window by sending a WM_Paint message to the window if the window's update region is not empty.

The function sends a WM_Paint message directly to the window procedure of the specified window, bypassing the application queue. If the update region is empty, no message is sent.

UpdateWindow(SafeHandle) Updates the client area of the specified window by sending a WM_Paint message to the window if the window's update region is not empty.

The function sends a WM_Paint message directly to the window procedure of the specified window, bypassing the application queue. If the update region is empty, no message is sent.

ValidateRect(IntPtr, NativeRectangle) Validates the client area within a rectangle by removing the rectangle from the update region of the specified window.
ValidateRect(IntPtr, Rectangle) Validates the client area within a rectangle by removing the rectangle from the update region of the specified window.
ValidateRect(SafeHandle, NativeRectangle) Validates the client area within a rectangle by removing the rectangle from the update region of the specified window.
ValidateRect(SafeHandle, Rectangle) Validates the client area within a rectangle by removing the rectangle from the update region of the specified window.
ValidateRgn(IntPtr, IntPtr) Validates the client area within a region by removing the region from the current update region of the specified window..
ValidateRgn(SafeHandle, SafeHandle) Validates the client area within a region by removing the region from the current update region of the specified window..
VkKeyScan Translates a character to the corresponding virtual-key code and shift state for the current keyboard.
Obsolete.
VkKeyScanEx Translates a character to the corresponding virtual-key code and shift state.

The function translates the character using the input language and physical keyboard layout identified by the input locale identifier.

WaitForInputIdle Waits until the specified process has finished processing its initial input and is waiting for user input with no input pending, or until the time-out interval has elapsed.
WaitMessage Yields control to other threads when a thread has no other messages in its message queue.

The WaitMessage function suspends the thread and does not return until a new message is placed in the thread's message queue.

WindowFromDC Returns a handle to the window associated with the specified display device context (DC).

Output functions that use the specified device context draw into this window.

WindowFromPhysicalPoint(NativePoint) Retrieves a handle to the window that contains the specified physical point.
WindowFromPhysicalPoint(Point) Retrieves a handle to the window that contains the specified physical point.
WindowFromPoint(NativePoint) Retrieves a handle to the window that contains the specified point.
WindowFromPoint(Point) Retrieves a handle to the window that contains the specified point.

Extension Methods

CanConvertTo Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
CanConvertToT Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
ConvertToT Converts an object to the specified target type.

If the conversion fails, an exception is thrown.
(Defined by ObjectExtensions)

ConvertToT Converts an object to the specified target type.

If the conversion fails, returns the specified default value.
(Defined by ObjectExtensions)

IsDisposable Determines whether the specified object is a disposable type (i.e., it implements IDisposable interface).
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
ThrowIfNullTException Throws the specified exception if the source object is null.
(Defined by ObjectExtensions)

See Also