Click or drag to resize

WindowsUtilities Class

As set of windows utilities.
Inheritance Hierarchy
SystemObject
  ShellBoost.Core.UtilitiesWindowsUtilities

Namespace:  ShellBoost.Core.Utilities
Assembly:  ShellBoost.Core (in ShellBoost.Core.dll) Version: 1.8.3.0
Syntax
C#
public static class WindowsUtilities

The WindowsUtilities type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberKernelVersion
Gets the current Windows version using the kernel32.dll file.
Top
Methods
  NameDescription
Public methodStatic memberActivateModalWindow
Activates the modal child window of a given window.
Public methodStatic memberActivateWindow(IntPtr)
Activates a window.
Public methodStatic memberActivateWindow(Window)
Activates a window.
Public methodStatic memberAllocConsole
Allocates a new console for the calling process.
Public methodStatic memberAllowSetForegroundWindow
Enables the specified process to set the foreground window using the SetForegroundWindow function. The calling process must already be able to set the foreground window.
Public methodStatic memberAttachConsole
Attaches the calling process to the console of the specified process.
Public methodStatic memberAttachThreadInput
Attaches the input processing mechanism of one thread to that of another thread.
Public methodStatic memberBringWindowToTop
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.
Public methodStatic memberCenter(Window)
Centers a window relatively to the screen.
Public methodStatic memberCenter(Window, IntPtr)
Centers a window relatively to another window, or to the screen.
Public methodStatic memberCenterWindow(IntPtr)
Centers a window relatively to the screen.
Public methodStatic memberCenterWindow(IntPtr, IntPtr)
Centers a window relatively to another window, or to the screen.
Public methodStatic memberChildWindowFromPoint
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.
Public methodStatic memberCloseWindow
Closes the specified window.
Public methodStatic memberDecode
Decodes a Windows message.
Public methodStatic memberDecodeMessage
Decodes a Windows message.
Public methodStatic memberDecryptSecureString
Decrypts an array of bytes, encrypted used EncryptSecureString, into a secure string.
Public methodStatic memberDestroyWindow
Destroys the specified window.
Public methodStatic memberDetachThreadInput
Detaches the input processing mechanism of one thread from that of another thread.
Public methodStatic memberDoModalUI(Action)
Runs an action in a modal UI loop.
Public methodStatic memberDoModalUIT(FuncT)
Runs a function in a modal UI loop.
Public methodStatic memberDoModelessAsync(Action)
Runs an action in a modeless UI loop.
Public methodStatic memberDoModelessAsyncT(FuncT)
Runs a function in a modeless UI loop.
Public methodStatic memberEnableWindow
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.
Public methodStatic memberEncryptSecureString
Encrypts a secure string into an array of bytes.
Public methodStatic memberEnsureSubKey
Ensures a registry sub key exists and opens it for write access.
Public methodStatic memberEnumerateChildWindows
Enumerates the child windows that belong to the specified parent window.
Public methodStatic memberEnumerateParentWindows
Enumerates the specified window's parent windows, if any.
Public methodStatic memberEnumerateProcessWindows(Int32)
Enumerates the child windows that belong to the specified parent window.
Public methodStatic memberEnumerateProcessWindows(Process)
Enumerates the child windows that belong to the specified parent window.
Public methodStatic memberEnumerateProperties
Enumerates all entries in the property list of a window.
Public methodStatic memberEnumerateThreadWindows
Enumerates the child windows that belong to the specified parent window.
Public methodStatic memberEnumerateTopLevelWindows
Enumerates all top-level windows on the screen. This function does not enumerate child windows, with the exception of a few top-level windows owned by the system that have the WS_CHILD style.
Public methodStatic memberEqualsOrdinal(SecureString, SecureString, Boolean)
Compares two secure strings by evaluating the numeric values of the corresponding character objects in each string.
Public methodStatic memberEqualsOrdinal(SecureString, String, Boolean)
Compares a secure string with an insecure string by evaluating the numeric values of the corresponding character objects in each string.
Public methodStatic memberFreeConsole
Detaches the calling process from its console.
Public methodStatic memberGetActiveWindow
Gets the window handle to the active window attached to the calling thread's message queue.
Public methodStatic memberGetAtomName
Retrieves a string associated with the specified local atom.
Public methodStatic memberGetClientRect
Gets 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).
Public methodStatic memberGetConsoleWindow
Retrieves the window handle used by the console associated with the calling process.
Public methodStatic memberGetCurrentThreadId
Retrieves the native thread identifier of the calling thread.
Public methodStatic memberGetDesktopWindow
Retrieves a handle to the desktop window. The desktop window covers the entire screen. The desktop window is the area on top of which other windows are painted.
Public methodStatic memberGetFocus
Retrieves the handle to the window that has the keyboard focus, if the window is attached to the calling thread's message queue.
Public methodStatic memberGetForegroundWindow
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.
Public methodStatic memberGetLastActivePopup
Determines which pop-up window owned by the specified window was most recently active. The return value is the same as the handle parameter, if any of the following conditions are met: 1) The window identified by hWnd was most recently active. 2) The window identified by hWnd does not own any pop-up windows. 3) The window identifies by hWnd is not a top-level window, or it is owned by another window.
Public methodStatic memberGetModalWindow
Gets the modal window for a given parent window.
Public methodStatic memberGetOwnerWindow
Gets the specified window's owner window, if any.
Public methodStatic memberGetParentWindow
Gets the specified window's parent window, if any.
Public methodStatic memberGetProfilesDirectory
Gets the path to the root directory where user profiles are stored.
Public methodStatic memberGetProp
Retrieves a data handle from the property list of the specified window. The character string identifies the handle to be retrieved. The string and handle must have been added to the property list by a previous call to the SetProp function.
Public methodStatic memberGetRealWindowClass
Retrieves the real name of the class to which the specified window belongs.
Public methodStatic memberGetRootOwnerWindow
Gets the specified window's root window, if any.
Public methodStatic memberGetRootWindow
Gets the specified window's root window, if any.
Public methodStatic memberGetShellWindow
Retrieves a handle to the Shell's desktop window.
Public methodStatic memberGetThreadActiveWindow
Gets a handle to the active window within the thread for a given thread.
Public methodStatic memberGetThreadCaptureWindow
Gets a handle to the window that has captured the mouse for a given thread.
Public methodStatic memberGetThreadCaretWindow
Gets a handle to the window that is displaying the caret for a given thread.
Public methodStatic memberGetThreadFocusWindow
Gets a handle to the window that has the keyboard focus for a given thread.
Public methodStatic memberGetThreadMenuOwnerWindow
Gets a handle to the window that owns any active menus for a given thread.
Public methodStatic memberGetThreadMoveSizeWindow
Gets a handle to the window in a move or size loop for a given thread.
Public methodStatic memberGetTopWindow
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.
Public methodStatic memberGetUserName
Gets the name of the user or other security principal associated with the calling thread. You can specify the format of the returned name. If the thread is impersonating a client, GetUserName returns the name of the client.
Public methodStatic memberGetUserProfileDirectory
Gets the path to the root directory of the specified user's profile.
Public methodStatic memberGetWindowClass
Retrieves the name of the class to which the specified window belongs.
Public methodStatic memberGetWindowDC
Retrieves the device context (DC) for the entire window, including title bar, menus, and scroll bars. The ReleaseDC function must be called to release the device context
Public methodStatic memberGetWindowDisplayAffinity
Retrieves the current display affinity setting, from any process, for a given window.
Public methodStatic memberGetWindowLong
Retrieves information about the specified window. The function also retrieves the value at a specified offset into the extra window memory.
Public methodStatic memberGetWindowModuleFileName
Retrieves the full path and file name of the module associated with the specified window handle.
Public methodStatic memberGetWindowProcessId
Gets the identifier of the process that created the window.
Public methodStatic memberGetWindowRect
Gets 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.
Public methodStatic memberGetWindowText
Gets the text of the specified window's title bar (if it has one).
Public methodStatic memberGetWindowThreadId
Retrieves the identifier of the thread that created the specified window.
Public methodStatic memberGlobalGetAtomName
Retrieves a string associated with the specified global atom.
Public methodStatic memberInvalidate
Invalidates the specified window's client area.
Public methodStatic memberInvalidateRect
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.
Public methodStatic memberInvalidateRgn
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.
Public methodStatic memberIsHungAppWindow
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. This function is not intended for general use. It may be altered or unavailable in subsequent versions of Windows.
Public methodStatic memberIsIconic
Determines whether a window is minimized (iconic).
Public methodStatic memberIsOutlook
Determines whether the specified process instance corresponds to Microsoft Office Outlook
Public methodStatic memberIsParentWindow
Determines whether the specified parent window is a parent or grand parent of the specified child window.
Public methodStatic memberIsPickerHost(Int32)
Determines whether the specified process instance corresponds to Windows Picker Host.
Public methodStatic memberIsPickerHost(Process)
Determines whether the specified process instance corresponds to Windows Picker Host.
Public methodStatic memberIsWindow
Determines whether the specified window handle identifies an existing window.
Public methodStatic memberIsWindowEnabled
Determines whether the specified window is enabled for mouse and keyboard input.
Public methodStatic memberIsWindows10OrGreater
Indicates if the current OS version matches, or is greater than, the Windows 10 version. On Windows 10 this function can return false if the application has no manifest. Check this for more information: https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-verifyversioninfoa
Public methodStatic memberIsWindows7OrGreater
Indicates if the current OS version matches, or is greater than, the Windows 7 version.
Public methodStatic memberIsWindows7SP1OrGreater
Indicates if the current OS version matches, or is greater than, the Windows 7 with Service Pack 1 (SP1) version.
Public methodStatic memberIsWindows8OrGreater
Indicates if the current OS version matches, or is greater than, the Windows 8 version.
Public methodStatic memberIsWindows8Point1OrGreater
Indicates if the current OS version matches, or is greater than, the Windows 8.1 version. On Windows 10 this function can return false if the application has no manifest. Check this for more information: https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-verifyversioninfoa
Public methodStatic memberIsWindowsExplorer(Int32)
Determines whether the specified process identifier corresponds to Windows Explorer.
Public methodStatic memberIsWindowsExplorer(Process)
Determines whether the specified process instance corresponds to Windows Explorer.
Public methodStatic memberIsWindowsVersionOrGreater
Indicates if the current OS version matches, or is greater than, the provided version information. This function is useful in confirming a version of Windows Server that doesn't share a version number with a client release. On Windows 10 this function can return false if the application has no manifest. Check this for more information: https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-verifyversioninfoa
Public methodStatic memberIsWindowsVistaOrGreater
Indicates if the current OS version matches, or is greater than, the Windows Vista version.
Public methodStatic memberIsWindowsVistaSP1OrGreater
Indicates if the current OS version matches, or is greater than, the Windows Vista with Service Pack 1 (SP1) version.
Public methodStatic memberIsWindowsVistaSP2OrGreater
Indicates if the current OS version matches, or is greater than, the Windows Vista with Service Pack 2 (SP2) version.
Public methodStatic memberIsWindowUnicode
Determines whether the specified window is a native Unicode window.
Public methodStatic memberIsWindowVisible
Determines the visibility state of the specified window.
Public methodStatic memberIsZoomed
Determines whether a window is maximized.
Public methodStatic memberLogicalToPhysicalPoint
Converts the logical coordinates of a point in a window to physical coordinates.
Public methodStatic memberMoveWindow
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.
Public methodStatic memberOpenExplorer
Opens the Windows Explorer on a given directory path.
Public methodStatic memberPhysicalToLogicalPoint
Converts the physical coordinates of a point in a window to logical coordinates.
Public methodStatic memberPostMessage
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.
Public methodStatic memberRedrawWindow(IntPtr, RDW)
Updates the entire client area of window.
Public methodStatic memberRedrawWindow(IntPtr, RECT, RDW)
Updates the specified rectangle in a window's client area.
Public methodStatic memberRedrawWindow(IntPtr, IntPtr, RDW)
Updates the region in a window's client area.
Public methodStatic memberReleaseDC
Releases a device context (DC), freeing it for use by other applications. The effect of the ReleaseDC function depends on the type of DC. It frees only common and window DCs. It has no effect on class or private DCs.
Public methodStatic memberRemoveProp
Removes an entry from the property list of the specified window. The specified character string identifies the entry to be removed.
Public methodStatic memberRename
Renames the specified registry key.
Public methodStatic memberRenameRegistryKey
Renames the specified registry key.
Public methodStatic memberRunForm(Form, Boolean)
Shows the form as a modal dialog box.
Public methodStatic memberRunForm(Form, IntPtr, Boolean)
Shows the form as a modal dialog box.
Public methodStatic memberRunWindow(Window)
Shows the window as a modal dialog box.
Public methodStatic memberRunWindow(Window, IntPtr)
Shows the window as a modal dialog box.
Public methodStatic memberSendMessage
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.
Public methodStatic memberSetActiveWindow
Activates a window. The window must be attached to the calling thread's message queue.
Public methodStatic memberSetConsoleIcon
Defines the console icon, if the current application is a console.
Public methodStatic memberSetConsoleStandardStreams
Sets In, Out and Error Console streams.
Public methodStatic memberSetFocus
Sets the keyboard focus to the specified window. The window must be attached to the calling thread's message queue.
Public methodStatic memberSetForegroundWindow(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.
Public methodStatic memberSetForegroundWindow(Window)
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.
Public methodStatic memberSetParent
Changes the parent window of the specified child window.
Public methodStatic memberSetProp
Adds a new entry or changes an existing entry in the property list of the specified window. The function adds a new entry to the list if the specified character string does not exist already in the list. The new entry contains the string and the handle. Otherwise, the function replaces the string's current handle with the specified handle.
Public methodStatic memberSetWindowDisplayAffinity
Stores the display affinity setting in kernel mode on the handle associated with the window.
Public methodStatic memberSetWindowLong
Changes an attribute of the specified window. The function also sets a value at the specified offset in the extra window memory.
Public methodStatic memberSetWindowPos
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.
Public methodStatic memberShowModal(Window)
Shows the window as a modal dialog box.
Public methodStatic memberShowModal(Form, Boolean)
Shows the form as a modal dialog box.
Public methodStatic memberShowModal(Window, IntPtr)
Shows the window as a modal dialog box.
Public methodStatic memberShowModal(Form, IntPtr, Boolean)
Shows the form as a modal dialog box.
Public methodStatic memberShowModelessAsync(Window)
Shows the window as a modeless dialog box.
Public methodStatic memberShowModelessAsync(Form, Boolean)
Shows the form as a modeless dialog box.
Public methodStatic memberShowModelessAsync(Window, IntPtr)
Shows the window as a modeless dialog box.
Public methodStatic memberShowModelessAsync(Form, IntPtr, Boolean)
Shows the form as a modeless dialog box.
Public methodStatic memberShowWindow
Sets the specified window's show state.
Public methodStatic memberShowWindowAsync
Sets the show state of a window without waiting for the operation to complete.
Public methodStatic memberSwitchToThisWindow
Switches focus to the specified window and brings it to the foreground. This function is not intended for general use. It may be altered or unavailable in subsequent versions of Windows.
Public methodStatic memberToInsecureString
Converts a secure string to an insecure string.
Public methodStatic memberToSecureString
Converts an insecure string to a secure string.
Public methodStatic memberUpdateWindow
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.
Public methodStatic memberWindowFromDC
Retrieves a handle to the window associated with the specified display device context (DC).
Public methodStatic memberWindowFromPhysicalPoint
Retrieves a handle to the window that contains the specified physical point.
Public methodStatic memberWindowFromPoint
Retrieves a handle to the window that contains the specified point.
Top
Fields
  NameDescription
Public fieldStatic memberApplicationIcon
The Application icon index.
Public fieldStatic memberHWND_BOTTOM
The HWND_BOTTOM desktop constant (1).
Public fieldStatic memberHWND_BROADCAST
The HWND_BROADCAST desktop constant (65535).
Public fieldStatic memberHWND_DESKTOP
The HWND desktop constant (0).
Public fieldStatic memberHWND_MESSAGE
The HWND_MESSAGE desktop constant (-3).
Public fieldStatic memberHWND_NOTOPMOST
The HWND_NOTOPMOST desktop constant (-2).
Public fieldStatic memberHWND_TOP
The HWND_TOP desktop constant (0).
Public fieldStatic memberHWND_TOPMOST
The HWND_TOPMOST desktop constant (-1).
Top
See Also