using System; using System.Linq; using System.Runtime.InteropServices; using System.Text; using Vanara.Extensions; using Vanara.InteropServices; using static Vanara.PInvoke.User32.SPCorrespondingTypeAttribute.SetParameterMethod; namespace Vanara.PInvoke { public static partial class User32 { /// Callback function that processes help events for the message box. /// The help information. [PInvokeData("Winuser.h")] [UnmanagedFunctionPointer(CallingConvention.Winapi)] public delegate void MsgBoxCallback(ref HELPINFO lpHelpInfo); /// The starting position and direction used when arranging minimized windows. [PInvokeData("Winuser.h")] [Flags] public enum ARW : uint { /// Start at the lower-left corner of the work area. ARW_BOTTOMLEFT = 0x0000, /// Start at the lower-right corner of the work area. ARW_BOTTOMRIGHT = 0x0001, /// Start at the upper-left corner of the work area. ARW_TOPLEFT = 0x0002, /// Start at the upper-right corner of the work area. ARW_TOPRIGHT = 0x0003, /// Arrange left (valid with ARW_BOTTOMRIGHT and ARW_TOPRIGHT only). ARW_LEFT = 0x0000, /// Arrange right (valid with ARW_BOTTOMLEFT and ARW_TOPLEFT only). ARW_RIGHT = 0x0000, /// Arrange up (valid with ARW_BOTTOMLEFT and ARW_BOTTOMRIGHT only). ARW_UP = 0x0004, /// Arrange down (valid with ARW_TOPLEFT and ARW_TOPRIGHT only). ARW_DOWN = 0x0004, /// Hide minimized windows by moving them off the visible area of the screen. ARW_HIDE = 0x0008, } /// A set of bit flags that specify properties of the time-out behavior for accessibility features. [PInvokeData("Winuser.h")] [Flags] public enum ATF { /// /// If this flag is set, a time-out period has been set for accessibility features. If this flag is not set, the features will /// not time out even though a time-out period is specified. /// ATF_TIMEOUTON = 0x00000001, /// /// If this flag is set, the operating system plays a descending siren sound when the time-out period elapses and the /// accessibility features are turned off. /// ATF_ONOFFFEEDBACK = 0x00000002 } /// Enum for SystemParametersInfo [PInvokeData("Winuser.h")] public enum ContactVisualization : uint { /// Specifies UI feedback for all contacts is off. CONTACTVISUALIZATION_OFF = 0x0000, /// Specifies UI feedback for all contacts is on. CONTACTVISUALIZATION_ON = 0x0001, /// Specifies UI feedback for all contacts is on with presentation mode visuals. CONTACTVISUALIZATION_PRESENTATIONMODE = 0x0002, } /// The shutdown type for the method. [PInvokeData("Winuser.h")] [Flags] public enum ExitWindowsFlags { /// /// Shuts down all processes running in the logon session of the process that called the ExitWindowsEx function. Then it logs the /// user off. /// This flag can be used only by processes running in an interactive user's logon session. /// EWX_LOGOFF = 0x00000000, /// /// Shuts down the system to a point at which it is safe to turn off the power. All file buffers have been flushed to disk, and /// all running processes have stopped. /// The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section. /// /// Specifying this flag will not turn off the power even if the system supports the power-off feature. You must specify /// EWX_POWEROFF to do this. /// /// Windows XP with SP1: If the system supports the power-off feature, specifying this flag turns off the power. /// EWX_SHUTDOWN = 0x00000001, /// /// Shuts down the system and then restarts the system. /// The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section. /// EWX_REBOOT = 0x00000002, /// /// This flag has no effect if terminal services is enabled. Otherwise, the system does not send the WM_QUERYENDSESSION message. /// This can cause applications to lose data. Therefore, you should only use this flag in an emergency. /// EWX_FORCE = 0x00000004, /// /// Shuts down the system and turns off the power. The system must support the power-off feature. /// The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section. /// EWX_POWEROFF = 0x00000008, /// /// Forces processes to terminate if they do not respond to the WM_QUERYENDSESSION or WM_ENDSESSION message within the timeout /// interval. For more information, see the Remarks. /// EWX_FORCEIFHUNG = 0x00000010, /// The ewx quickresolve EWX_QUICKRESOLVE = 0x00000020, /// /// Shuts down the system and then restarts it, as well as any applications that have been registered for restart using the /// RegisterApplicationRestart function. These application receive the WM_QUERYENDSESSION message with lParam set to the /// ENDSESSION_CLOSEAPP value. For more information, see Guidelines for Applications. /// EWX_RESTARTAPPS = 0x00000040, /// /// Beginning with Windows 8: You can prepare the system for a faster startup by combining the EWX_HYBRID_SHUTDOWN flag with the /// EWX_SHUTDOWN flag. /// EWX_HYBRID_SHUTDOWN = 0x00400000, /// When combined with the EWX_REBOOT flag, will reboot to the boot options. EWX_BOOTOPTIONS = 0x01000000, } /// A set of bit flags that specify properties of the FilterKeys feature. [PInvokeData("Winuser.h")] [Flags] public enum FKF { /// The FilterKeys features are available. FKF_AVAILABLE = 0x00000002, /// /// The computer makes a click sound when a key is pressed or accepted. If SlowKeys is on, a click is generated when the key is /// pressed and again when the keystroke is accepted. /// FKF_CLICKON = 0x00000040, /// /// Windows 95/98, Windows 2000: A confirmation dialog box appears when the FilterKeys features are activated by using the hot key. /// FKF_CONFIRMHOTKEY = 0x00000008, /// The FilterKeys features are on. FKF_FILTERKEYSON = 0x00000001, /// The user can turn the FilterKeys feature on and off by holding down the RIGHT SHIFT key for eight seconds. FKF_HOTKEYACTIVE = 0x00000004, /// /// If this flag is set, the computer plays a siren sound when the user turns the FilterKeys feature on or off by using the hot key. /// FKF_HOTKEYSOUND = 0x00000010, /// Windows 95, Windows 2000: A visual indicator is displayed when the FilterKeys features are on. FKF_INDICATOR = 0x00000020, } /// Enum for SystemParametersInfo [PInvokeData("Winuser.h")] [Flags] public enum GestureVisualization : uint { /// Specifies that UI feedback for all gestures is off. GESTUREVISUALIZATION_OFF = 0x0000, /// Specifies that UI feedback for all gestures is on. GESTUREVISUALIZATION_ON = 0x001F, /// Specifies UI feedback for a tap. GESTUREVISUALIZATION_TAP = 0x0001, /// Specifies UI feedback for a double tap. GESTUREVISUALIZATION_DOUBLETAP = 0x0002, /// Specifies UI feedback for a press and tap. GESTUREVISUALIZATION_PRESSANDTAP = 0x0004, /// Specifies UI feedback for a press and hold. GESTUREVISUALIZATION_PRESSANDHOLD = 0x0008, /// Specifies UI feedback for a right tap. GESTUREVISUALIZATION_RIGHTTAP = 0x0010, } /// Enum for SystemParametersInfo [PInvokeData("Winuser.h")] public enum HANDEDNESS { /// Undocumented HANDEDNESS_LEFT = 0, /// Undocumented HANDEDNESS_RIGHT } /// Values used by HELPINFO.iContextType specifying the type of context for which Help is requested. [PInvokeData("Winuser.h")] public enum HELPINFOCONTEXT { /// Help requested for a menu item. HELPINFO_MENUITEM, /// Help requested for a control or window. HELPINFO_WINDOW } /// A set of bit flags that specify properties of the HighContrast feature. [PInvokeData("Winuser.h")] [Flags] public enum HFC { /// The high contrast feature is available. HCF_AVAILABLE = 0x00000002, /// A confirmation dialog appears when the high contrast feature is activated by using the hot key. HCF_CONFIRMHOTKEY = 0x00000008, /// The high contrast feature is on. HCF_HIGHCONTRASTON = 0x00000001, /// /// The user can turn the high contrast feature on and off by simultaneously pressing the left ALT, left SHIFT, and PRINT SCREEN keys. /// HCF_HOTKEYACTIVE = 0x00000004, /// /// The hot key associated with the high contrast feature can be enabled. An application can retrieve this value, but cannot set it. /// HCF_HOTKEYAVAILABLE = 0x00000040, /// A siren is played when the user turns the high contrast feature on or off by using the hot key. HCF_HOTKEYSOUND = 0x00000010, /// /// A visual indicator is displayed when the high contrast feature is on. This value is not currently used and is ignored. /// HCF_INDICATOR = 0x00000020, /// Undocumented HCF_LOGONDESKTOP = 0x00000100, /// Undocumented HCF_DEFAULTDESKTOP = 0x00000200 } /// Specifies the contents and behavior of a message box. [PInvokeData("Winuser.h")] [Flags] public enum MB_FLAGS { /// The message box contains three push buttons: Abort, Retry, and Ignore. MB_ABORTRETRYIGNORE = 0x00000002, /// /// The message box contains three push buttons: Cance, Try Again, Continue. Use this message box type instead of MB_ABORTRETRYIGNORE. /// MB_CANCELTRYCONTINUE = 0x00000006, /// /// Adds a Help button to the message box. When the user clicks the Help button or presses F1, the system sends a WM_HELP message /// to the owner. /// MB_HELP = 0x00004000, /// The message box contains one push button: OK. This is the default. MB_OK = 0x00000000, /// The message box contains two push buttons: OK and Cancel. MB_OKCANCEL = 0x00000001, /// The message box contains two push buttons: Retry and Cancel. MB_RETRYCANCEL = 0x00000005, /// The message box contains two push buttons: Yes and No. MB_YESNO = 0x00000004, /// The message box contains three push buttons: Yes, No, and Cancel. MB_YESNOCANCEL = 0x00000003, /// An exclamation-point icon appears in the message box. MB_ICONEXCLAMATION = 0x00000030, /// An exclamation-point icon appears in the message box. MB_ICONWARNING = 0x00000030, /// An icon consisting of a lowercase letter i in a circle appears in the message box. MB_ICONINFORMATION = 0x00000040, /// An icon consisting of a lowercase letter i in a circle appears in the message box. MB_ICONASTERISK = 0x00000040, /// /// A question-mark icon appears in the message box. The question-mark message icon is no longer recommended because it does not /// clearly represent a specific type of message and because the phrasing of a message as a question could apply to any message /// type. In addition, users can confuse the message symbol question mark with Help information. Therefore, do not use this /// question mark message symbol in your message boxes. The system continues to support its inclusion only for backward compatibility. /// MB_ICONQUESTION = 0x00000020, /// A stop-sign icon appears in the message box. MB_ICONSTOP = 0x00000010, /// A stop-sign icon appears in the message box. MB_ICONERROR = 0x00000010, /// A stop-sign icon appears in the message box. MB_ICONHAND = 0x00000010, /// /// The first button is the default button. /// MB_DEFBUTTON1 is the default unless MB_DEFBUTTON2, MB_DEFBUTTON3, or MB_DEFBUTTON4 is specified. /// MB_DEFBUTTON1 = 0x00000000, /// The second button is the default button. MB_DEFBUTTON2 = 0x00000100, /// The third button is the default button. MB_DEFBUTTON3 = 0x00000200, /// The fourth button is the default button. MB_DEFBUTTON4 = 0x00000300, /// /// The user must respond to the message box before continuing work in the window identified by the hWnd parameter. However, the /// user can move to the windows of other threads and work in those windows. /// /// Depending on the hierarchy of windows in the application, the user may be able to move to other windows within the thread. /// All child windows of the parent of the message box are automatically disabled, but pop-up windows are not. /// /// MB_APPLMODAL is the default if neither MB_SYSTEMMODAL nor MB_TASKMODAL is specified. /// MB_APPLMODAL = 0x00000000, /// /// Same as MB_APPLMODAL except that the message box has the WS_EX_TOPMOST style. Use system-modal message boxes to notify the /// user of serious, potentially damaging errors that require immediate attention (for example, running out of memory). This flag /// has no effect on the user's ability to interact with windows other than those associated with hWnd. /// MB_SYSTEMMODAL = 0x00001000, /// /// Same as MB_APPLMODAL except that all the top-level windows belonging to the current thread are disabled if the hWnd parameter /// is NULL. Use this flag when the calling application or library does not have a window handle available but still needs to /// prevent input to other windows in the calling thread without suspending other threads. /// MB_TASKMODAL = 0x00002000, /// /// Same as desktop of the interactive window station. For more information, see Window Stations. /// /// If the current input desktop is not the default desktop, MessageBox does not return until the user switches to the default desktop. /// /// MB_DEFAULT_DESKTOP_ONLY = 0x00020000, /// The text is right-justified. MB_RIGHT = 0x00080000, /// Displays message and caption text using right-to-left reading order on Hebrew and Arabic systems. MB_RTLREADING = 0x00100000, /// /// The message box becomes the foreground window. Internally, the system calls the SetForegroundWindow function for the message box. /// MB_SETFOREGROUND = 0x00010000, /// The message box is created with the WS_EX_TOPMOST window style. MB_TOPMOST = 0x00040000, /// /// The caller is a service notifying the user of an event. The function displays a message box on the current active desktop, /// even if there is no user logged on to the computer. /// /// Terminal Services: If the calling thread has an impersonation token, the function directs the message box to the session /// specified in the impersonation token. /// /// /// If this flag is set, the hWnd parameter must be NULL. This is so that the message box can appear on a desktop other than the /// desktop corresponding to the hWnd. /// /// /// For information on security considerations in regard to using this flag, see Interactive Services. In particular, be aware /// that this flag can produce interactive content on a locked desktop and should therefore be used for only a very limited set /// of scenarios, such as resource exhaustion. /// /// MB_SERVICE_NOTIFICATION = 0x00200000, } /// Specifies the contents and behavior of a message box. [PInvokeData("Winuser.h")] [Flags] public enum MB_RESULT { /// The Abort button was selected. IDABORT = 3, /// The Cancel button was selected. IDCANCEL = 2, /// The Continue button was selected. IDCONTINUE = 11, /// The Ignore button was selected. IDIGNORE = 5, /// The No button was selected. IDNO = 7, /// The OK button was selected. IDOK = 1, /// The Retry button was selected. IDRETRY = 4, /// The Try Again button was selected. IDTRYAGAIN = 10, /// The Yes button was selected. IDYES = 6, } /// A set of bit-flags that specify properties of the MouseKeys feature. [PInvokeData("Winuser.h")] [Flags] public enum MKF : uint { /// If this flag is set, the MouseKeys feature is available. MKF_AVAILABLE = 0x00000002, /// /// Windows 95/98, Windows 2000: A confirmation dialog box appears when the MouseKeys feature is activated by using the hot key. /// MKF_CONFIRMHOTKEY = 0x00000008, /// /// If this flag is set, the user can turn the MouseKeys feature on and off by using the hot key, which is LEFT ALT+LEFT /// SHIFT+NUM LOCK. /// MKF_HOTKEYACTIVE = 0x00000004, /// /// If this flag is set, the system plays a siren sound when the user turns the MouseKeys feature on or off by using the hot key. /// MKF_HOTKEYSOUND = 0x00000010, /// Windows 95/98, Windows 2000: A visual indicator is displayed when the MouseKeys feature is on. MKF_INDICATOR = 0x00000020, /// Windows 95/98, Windows 2000: The left button is in the "down" state. MKF_LEFTBUTTONDOWN = 0x01000000, /// Windows 95/98, Windows 2000: The user has selected the left button for mouse-button actions. MKF_LEFTBUTTONSEL = 0x10000000, /// /// Windows 95/98, Windows 2000: The CTRL key increases cursor speed by the value specified by the iCtrlSpeed member, and the /// SHIFT key causes the cursor to delay briefly after moving a single pixel, allowing fine positioning of the cursor. If this /// value is not specified, the CTRLand SHIFT keys are ignored while the user moves the mouse cursor using the arrow keys. /// MKF_MODIFIERS = 0x00000040, /// If this flag is set, the MouseKeys feature is on. MKF_MOUSEKEYSON = 0x00000001, /// Windows 95/98, Windows 2000: The system is processing numeric keypad input as mouse commands. MKF_MOUSEMODE = 0x80000000, /// /// Windows 95/98, Windows 2000: The numeric keypad moves the mouse when the NUM LOCK key is on. If this flag is not specified, /// the numeric keypad moves the mouse cursor when the NUM LOCK key is off. /// MKF_REPLACENUMBERS = 0x00000080, /// Windows 95/98, Windows 2000: The right button is in the "down" state. MKF_RIGHTBUTTONDOWN = 0x02000000, /// Windows 95/98, Windows 2000: The user has selected the right button for mouse-button actions. MKF_RIGHTBUTTONSEL = 0x20000000, } /// Enum for SystemParametersInfo [PInvokeData("Winuser.h")] public enum MouseWheelRouting : uint { /// Mouse wheel input is delivered to the app with focus. MOUSEWHEEL_ROUTING_FOCUS = 0, /// /// Mouse wheel input is delivered to the app with focus (desktop apps) or the app under the mouse cursor (Windows Store apps). /// MOUSEWHEEL_ROUTING_HYBRID = 1, /// Undocumented MOUSEWHEEL_ROUTING_MOUSE_POS = 2 } /// Enum for SystemParametersInfo [PInvokeData("Winuser.h")] public enum PenArbitrationType : uint { /// Undocumented PENARBITRATIONTYPE_NONE = 0x0000, /// Undocumented PENARBITRATIONTYPE_WIN8 = 0x0001, /// Undocumented PENARBITRATIONTYPE_FIS = 0x0002, /// Undocumented PENARBITRATIONTYPE_SPT = 0x0003, /// Undocumented PENARBITRATIONTYPE_MAX = 0x0004, } /// Enum for SystemParametersInfo [PInvokeData("Winuser.h")] public enum PenVisualization : uint { /// Specifies that UI feedback for all pen gestures is off. PENVISUALIZATION_OFF = 0x0000, /// Specifies that UI feedback for all pen gestures is on. PENVISUALIZATION_ON = 0x0023, /// Specifies UI feedback for a pen tap. PENVISUALIZATION_TAP = 0x0001, /// Specifies UI feedback for a pen double tap. PENVISUALIZATION_DOUBLETAP = 0x0002, /// Specifies UI feedback for the pen cursor. PENVISUALIZATION_CURSOR = 0x0020, } /// A set of bit-flags that specify properties of the SerialKeys feature. [PInvokeData("Winuser.h")] [Flags] public enum SERKF { /// The SerialKeys feature is on. SERKF_SERIALKEYSON = 0x00000001, /// The SerialKeys feature is available. SERKF_AVAILABLE = 0x00000002, /// A visual indicator is displayed when the SerialKeys feature is on. This value is not currently used and is ignored. SERKF_INDICATOR = 0x00000004, } /// A set of bit-flags that specify properties of the StickyKeys feature. [PInvokeData("Winuser.h")] [Flags] public enum SKF : uint { /// /// If this flag is set, the system plays a sound when the user latches, locks, or releases modifier keys using the StickyKeys feature. /// SKF_AUDIBLEFEEDBACK = 0x00000040, /// If this flag is set, the StickyKeys feature is available. SKF_AVAILABLE = 0x00000002, /// /// Windows 95/98, Windows 2000: A confirmation dialog appears when the StickyKeys feature is activated by using the hot key. /// SKF_CONFIRMHOTKEY = 0x00000008, /// If this flag is set, the user can turn the StickyKeys feature on and off by pressing the SHIFT key five times. SKF_HOTKEYACTIVE = 0x00000004, /// /// If this flag is set, the system plays a siren sound when the user turns the StickyKeys feature on or off by using the hot key. /// SKF_HOTKEYSOUND = 0x00000010, /// Windows 95/98, Windows 2000: A visual indicator should be displayed when the StickyKeys feature is on. SKF_INDICATOR = 0x00000020, /// If this flag is set, the StickyKeys feature is on. SKF_STICKYKEYSON = 0x00000001, /// /// If this flag is set, pressing a modifier key twice in a row locks down the key until the user presses it a third time. /// SKF_TRISTATE = 0x00000080, /// /// If this flag is set, releasing a modifier key that has been pressed in combination with any other key turns off the /// StickyKeys feature. /// SKF_TWOKEYSOFF = 0x00000100, /// Windows 98, Windows 2000: The left ALT key is latched. SKF_LALTLATCHED = 0x10000000, /// Windows 98, Windows 2000: The left CTRL key is latched. SKF_LCTLLATCHED = 0x04000000, /// Windows 98, Windows 2000: The left SHIFT key is latched. SKF_LSHIFTLATCHED = 0x01000000, /// Windows 98, Windows 2000: The right ALT key is latched. SKF_RALTLATCHED = 0x20000000, /// Windows 98, Windows 2000: The right CTRL key is latched. SKF_RCTLLATCHED = 0x08000000, /// Windows 98, Windows 2000: The right SHIFT key is latched. SKF_RSHIFTLATCHED = 0x02000000, /// Windows 98, Windows 2000: The left ALT key is locked. SKF_LALTLOCKED = 0x00100000, /// Windows 98, Windows 2000: The left CTRL key is locked. SKF_LCTLLOCKED = 0x00040000, /// Windows 98, Windows 2000: The left SHIFT key is locked. SKF_LSHIFTLOCKED = 0x00010000, /// Windows 98, Windows 2000: The right ALT key is locked. SKF_RALTLOCKED = 0x00200000, /// Windows 98, Windows 2000: The right CTRL key is locked. SKF_RCTLLOCKED = 0x00080000, /// Windows 98, Windows 2000: The right SHIFT key is locked. SKF_RSHIFTLOCKED = 0x00020000, /// Windows 98, Windows 2000: The left Windows key is latched. SKF_LWINLATCHED = 0x40000000, /// Windows 98, Windows 2000: The right Windows key is latched. SKF_RWINLATCHED = 0x80000000, /// Windows 98, Windows 2000: The left Windows key is locked. SKF_LWINLOCKED = 0x00400000, /// Windows 98, Windows 2000: The right Windows key is locked. SKF_RWINLOCKED = 0x00800000, } /// Enum for SystemParametersInfo [PInvokeData("Winuser.h")] public enum SPI : uint { /// /// Determines whether the warning beeper is on. The pvParam parameter must point to a BOOL variable that receives TRUE if the /// beeper is on, or FALSE if it is off. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETBEEP = 0x0001, /// Turns the warning beeper on or off. The uiParam parameter specifies TRUE for on, or FALSE for off. [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETBEEP = 0x0002, /// /// Retrieves the two mouse threshold values and the mouse acceleration. The pvParam parameter must point to an array of three /// integers that receives these values. See mouse_event for further information. /// [SPCorrespondingType(typeof(int[]), CorrespondingAction.Get)] SPI_GETMOUSE = 0x0003, /// /// Sets the two mouse threshold values and the mouse acceleration. The pvParam parameter must point to an array of three /// integers that specifies these values. See mouse_event for further information. /// [SPCorrespondingType(typeof(int[]), CorrespondingAction.Set)] SPI_SETMOUSE = 0x0004, /// /// Retrieves the border multiplier factor that determines the width of a window's sizing border. The pvParam parameter must /// point to an integer variable that receives this value. /// [SPCorrespondingType(typeof(int), CorrespondingAction.Get)] SPI_GETBORDER = 0x0005, /// /// Sets the border multiplier factor that determines the width of a window's sizing border. The uiParam parameter specifies the /// new value. /// [SPCorrespondingType(typeof(int), CorrespondingAction.Set, UiParam)] SPI_SETBORDER = 0x0006, /// /// Retrieves the keyboard repeat-speed setting, which is a value in the range from 0 (approximately 2.5 repetitions per second) /// through 31 (approximately 30 repetitions per second). The actual repeat rates are hardware-dependent and may vary from a /// linear scale by as much as 20%. The pvParam parameter must point to a DWORD variable that receives the setting /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETKEYBOARDSPEED = 0x000A, /// /// Sets the keyboard repeat-speed setting. The uiParam parameter must specify a value in the range from 0 (approximately 2.5 /// repetitions per second) through 31 (approximately 30 repetitions per second). The actual repeat rates are hardware-dependent /// and may vary from a linear scale by as much as 20%. If uiParam is greater than 31, the parameter is set to 31. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, UiParam)] SPI_SETKEYBOARDSPEED = 0x000B, /// Not implemented. SPI_LANGDRIVER = 0x000C, /// /// Sets or retrieves the width, in pixels, of an icon cell. The system uses this rectangle to arrange icons in large icon view. /// To set this value, set uiParam to the new value and set pvParam to null. You cannot set this value to less than SM_CXICON. To /// retrieve this value, pvParam must point to an integer that receives the current value. /// [SPCorrespondingType(typeof(int), CorrespondingAction.GetSet, UiParam)] SPI_ICONHORIZONTALSPACING = 0x000D, /// /// Retrieves the screen saver time-out value, in seconds. The pvParam parameter must point to an integer variable that receives /// the value. /// [SPCorrespondingType(typeof(int), CorrespondingAction.Get)] SPI_GETSCREENSAVETIMEOUT = 0x000E, /// /// Sets the screen saver time-out value to the value of the uiParam parameter. This value is the amount of time, in seconds, /// that the system must be idle before the screen saver activates. /// [SPCorrespondingType(typeof(int), CorrespondingAction.Set, UiParam)] SPI_SETSCREENSAVETIMEOUT = 0x000F, /// /// Determines whether screen saving is enabled. The pvParam parameter must point to a bool variable that receives TRUE if screen /// saving is enabled, or FALSE otherwise. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETSCREENSAVEACTIVE = 0x0010, /// /// Sets the state of the screen saver. The uiParam parameter specifies TRUE to activate screen saving, or FALSE to deactivate it. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETSCREENSAVEACTIVE = 0x0011, /// /// Retrieves the current granularity value of the desktop sizing grid. The pvParam parameter must point to an integer variable /// that receives the granularity. /// [Obsolete, SPCorrespondingType(typeof(int), CorrespondingAction.Get)] SPI_GETGRIDGRANULARITY = 0x0012, /// Sets the granularity of the desktop sizing grid to the value of the uiParam parameter. [SPCorrespondingType(typeof(int), CorrespondingAction.Set, UiParam)] SPI_SETGRIDGRANULARITY = 0x0013, /// /// Sets the desktop wallpaper. The value of the pvParam parameter determines the new wallpaper. To specify a wallpaper bitmap, /// set pvParam to point to a null-terminated string containing the name of a bitmap file. Setting pvParam to "" removes the /// wallpaper. Setting pvParam to SETWALLPAPER_DEFAULT or null reverts to the default wallpaper. /// [SPCorrespondingType(typeof(string), CorrespondingAction.Set, Direct)] // TODO: Check if this is correct SPI_SETDESKWALLPAPER = 0x0014, /// Sets the current desktop pattern by causing Windows to read the Pattern= setting from the WIN.INI file. [SPCorrespondingType(typeof(string), CorrespondingAction.Set, UiParam)] SPI_SETDESKPATTERN = 0x0015, /// /// Retrieves the keyboard repeat-delay setting, which is a value in the range from 0 (approximately 250 ms delay) through 3 /// (approximately 1 second delay). The actual delay associated with each value may vary depending on the hardware. The pvParam /// parameter must point to an integer variable that receives the setting. /// [SPCorrespondingType(typeof(int), CorrespondingAction.Get)] SPI_GETKEYBOARDDELAY = 0x0016, /// /// Sets the keyboard repeat-delay setting. The uiParam parameter must specify 0, 1, 2, or 3, where zero sets the shortest delay /// (approximately 250 /// ms) and 3 sets the longest delay (approximately 1 second). The actual delay associated with each value may vary depending on /// the hardware. /// [SPCorrespondingType(typeof(int), CorrespondingAction.Set, UiParam)] SPI_SETKEYBOARDDELAY = 0x0017, /// /// Sets or retrieves the height, in pixels, of an icon cell. To set this value, set uiParam to the new value and set pvParam to /// null. You cannot set this value to less than SM_CYICON. To retrieve this value, pvParam must point to an integer that /// receives the current value. /// [SPCorrespondingType(typeof(int), CorrespondingAction.GetSet, UiParam)] SPI_ICONVERTICALSPACING = 0x0018, /// /// Determines whether icon-title wrapping is enabled. The pvParam parameter must point to a bool variable that receives TRUE if /// enabled, or FALSE otherwise. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETICONTITLEWRAP = 0x0019, /// Turns icon-title wrapping on or off. The uiParam parameter specifies TRUE for on, or FALSE for off. [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETICONTITLEWRAP = 0x001A, /// /// Determines whether pop-up menus are left-aligned or right-aligned, relative to the corresponding menu-bar item. The pvParam /// parameter must point to a bool variable that receives TRUE if left-aligned, or FALSE otherwise. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETMENUDROPALIGNMENT = 0x001B, /// /// Sets the alignment value of pop-up menus. The uiParam parameter specifies TRUE for right alignment, or FALSE for left alignment. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETMENUDROPALIGNMENT = 0x001C, /// /// Sets the width of the double-click rectangle to the value of the uiParam parameter. The double-click rectangle is the /// rectangle within which the second click of a double-click must fall for it to be registered as a double-click. To retrieve /// the width of the double-click rectangle, call GetSystemMetrics with the SM_CXDOUBLECLK flag. /// [SPCorrespondingType(typeof(int), CorrespondingAction.Set, UiParam)] SPI_SETDOUBLECLKWIDTH = 0x001D, /// /// Sets the height of the double-click rectangle to the value of the uiParam parameter. The double-click rectangle is the /// rectangle within which the second click of a double-click must fall for it to be registered as a double-click. To retrieve /// the height of the double-click rectangle, call GetSystemMetrics with the SM_CYDOUBLECLK flag. /// [SPCorrespondingType(typeof(int), CorrespondingAction.Set, UiParam)] SPI_SETDOUBLECLKHEIGHT = 0x001E, /// /// Retrieves the logical font information for the current icon-title font. The uiParam parameter specifies the size of a LOGFONT /// structure, and the pvParam parameter must point to the LOGFONT structure to fill in. /// [SPCorrespondingType(typeof(LOGFONT), CorrespondingAction.Get)] SPI_GETICONTITLELOGFONT = 0x001F, /// /// Sets the double-click time for the mouse to the value of the uiParam parameter. The double-click time is the maximum number /// of milliseconds that can occur between the first and second clicks of a double-click. You can also call the /// SetDoubleClickTime function to set the double-click time. To get the current double-click time, call the GetDoubleClickTime function. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, UiParam)] SPI_SETDOUBLECLICKTIME = 0x0020, /// /// Swaps or restores the meaning of the left and right mouse buttons. The uiParam parameter specifies TRUE to swap the meanings /// of the buttons, or FALSE to restore their original meanings. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETMOUSEBUTTONSWAP = 0x0021, /// /// Sets the font that is used for icon titles. The uiParam parameter specifies the size of a LOGFONT structure, and the pvParam /// parameter must point to a LOGFONT structure. /// [SPCorrespondingType(typeof(LOGFONT), CorrespondingAction.Set)] SPI_SETICONTITLELOGFONT = 0x0022, /// /// This flag is obsolete. Previous versions of the system use this flag to determine whether ALT+TAB fast task switching is /// enabled. For Windows 95, Windows 98, and Windows NT version 4.0 and later, fast task switching is always enabled. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get), Obsolete] SPI_GETFASTTASKSWITCH = 0x0023, /// /// This flag is obsolete. Previous versions of the system use this flag to enable or disable ALT+TAB fast task switching. For /// Windows 95, Windows 98, and Windows NT version 4.0 and later, fast task switching is always enabled. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set), Obsolete] SPI_SETFASTTASKSWITCH = 0x0024, /// /// Sets dragging of full windows either on or off. The uiParam parameter specifies TRUE for on, or FALSE for off. Windows 95: /// This flag is supported only if Windows Plus! is installed. See SPI_GETWINDOWSEXTENSION. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETDRAGFULLWINDOWS = 0x0025, /// /// Determines whether dragging of full windows is enabled. The pvParam parameter must point to a BOOL variable that receives /// TRUE if enabled, or FALSE otherwise. Windows 95: This flag is supported only if Windows Plus! is installed. See SPI_GETWINDOWSEXTENSION. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETDRAGFULLWINDOWS = 0x0026, /// /// Retrieves the metrics associated with the nonclient area of nonminimized windows. The pvParam parameter must point to a /// NONCLIENTMETRICS structure that receives the information. Set the cbSize member of this structure and the uiParam parameter /// to sizeof(NONCLIENTMETRICS). /// [SPCorrespondingType(typeof(NONCLIENTMETRICS), CorrespondingAction.Get)] SPI_GETNONCLIENTMETRICS = 0x0029, /// /// Sets the metrics associated with the nonclient area of nonminimized windows. The pvParam parameter must point to a /// NONCLIENTMETRICS structure that contains the new parameters. Set the cbSize member of this structure and the uiParam /// parameter to sizeof(NONCLIENTMETRICS). Also, the lfHeight member of the LOGFONT structure must be a negative value. /// [SPCorrespondingType(typeof(NONCLIENTMETRICS), CorrespondingAction.Set)] SPI_SETNONCLIENTMETRICS = 0x002A, /// /// Retrieves the metrics associated with minimized windows. The pvParam parameter must point to a MINIMIZEDMETRICS structure /// that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(MINIMIZEDMETRICS). /// [SPCorrespondingType(typeof(MINIMIZEDMETRICS), CorrespondingAction.Get)] SPI_GETMINIMIZEDMETRICS = 0x002B, /// /// Sets the metrics associated with minimized windows. The pvParam parameter must point to a MINIMIZEDMETRICS structure that /// contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(MINIMIZEDMETRICS). /// [SPCorrespondingType(typeof(MINIMIZEDMETRICS), CorrespondingAction.Set)] SPI_SETMINIMIZEDMETRICS = 0x002C, /// /// Retrieves the metrics associated with icons. The pvParam parameter must point to an ICONMETRICS structure that receives the /// information. Set the cbSize member of this structure and the uiParam parameter to sizeof(ICONMETRICS). /// [SPCorrespondingType(typeof(ICONMETRICS), CorrespondingAction.Get)] SPI_GETICONMETRICS = 0x002D, /// /// Sets the metrics associated with icons. The pvParam parameter must point to an ICONMETRICS structure that contains the new /// parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(ICONMETRICS). /// [SPCorrespondingType(typeof(ICONMETRICS), CorrespondingAction.Set)] SPI_SETICONMETRICS = 0x002E, /// /// Sets the size of the work area. The work area is the portion of the screen not obscured by the system taskbar or by /// application desktop toolbars. The pvParam parameter is a pointer to a RECT structure that specifies the new work area /// rectangle, expressed in virtual screen coordinates. In a system with multiple display monitors, the function sets the work /// area of the monitor that contains the specified rectangle. /// [SPCorrespondingType(typeof(RECT), CorrespondingAction.Set)] SPI_SETWORKAREA = 0x002F, /// /// Retrieves the size of the work area on the primary display monitor. The work area is the portion of the screen not obscured /// by the system taskbar or by application desktop toolbars. The pvParam parameter must point to a RECT structure that receives /// the coordinates of the work area, expressed in virtual screen coordinates. To get the work area of a monitor other than the /// primary display monitor, call the GetMonitorInfo function. /// [SPCorrespondingType(typeof(RECT), CorrespondingAction.Get)] SPI_GETWORKAREA = 0x0030, /// /// Windows Me/98/95: Pen windows is being loaded or unloaded. The uiParam parameter is TRUE when loading and FALSE when /// unloading pen windows. The pvParam parameter is null. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETPENWINDOWS = 0x0031, /// /// Retrieves information about the HighContrast accessibility feature. The pvParam parameter must point to a HIGHCONTRAST /// structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to /// sizeof(HIGHCONTRAST). For a general discussion, see remarks. Windows NT: This value is not supported. /// /// /// There is a difference between the High Contrast color scheme and the High Contrast Mode. The High Contrast color scheme /// changes the system colors to colors that have obvious contrast; you switch to this color scheme by using the Display Options /// in the control panel. The High Contrast Mode, which uses SPI_GETHIGHCONTRAST and SPI_SETHIGHCONTRAST, advises applications to /// modify their appearance for visually-impaired users. It involves such things as audible warning to users and customized color /// scheme (using the Accessibility Options in the control panel). For more information, see HIGHCONTRAST on MSDN. For more /// information on general accessibility features, see Accessibility on MSDN. /// [SPCorrespondingType(typeof(HIGHCONTRAST), CorrespondingAction.Get)] SPI_GETHIGHCONTRAST = 0x0042, /// /// Sets the parameters of the HighContrast accessibility feature. The pvParam parameter must point to a HIGHCONTRAST structure /// that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(HIGHCONTRAST). /// Windows NT: This value is not supported. /// [SPCorrespondingType(typeof(HIGHCONTRAST), CorrespondingAction.Set)] SPI_SETHIGHCONTRAST = 0x0043, /// /// Determines whether the user relies on the keyboard instead of the mouse, and wants applications to display keyboard /// interfaces that would otherwise be hidden. The pvParam parameter must point to a BOOL variable that receives TRUE if the user /// relies on the keyboard; or FALSE otherwise. Windows NT: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETKEYBOARDPREF = 0x0044, /// /// Sets the keyboard preference. The uiParam parameter specifies TRUE if the user relies on the keyboard instead of the mouse, /// and wants applications to display keyboard interfaces that would otherwise be hidden; uiParam is FALSE otherwise. Windows NT: /// This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETKEYBOARDPREF = 0x0045, /// /// Determines whether a screen reviewer utility is running. A screen reviewer utility directs textual information to an output /// device, such as a speech synthesizer or Braille display. When this flag is set, an application should provide textual /// information in situations where it would otherwise present the information graphically. The pvParam parameter is a pointer to /// a BOOL variable that receives TRUE if a screen reviewer utility is running, or FALSE otherwise. Windows NT: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETSCREENREADER = 0x0046, /// /// Determines whether a screen review utility is running. The uiParam parameter specifies TRUE for on, or FALSE for off. Windows /// NT: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETSCREENREADER = 0x0047, /// /// Retrieves the animation effects associated with user actions. The pvParam parameter must point to an ANIMATIONINFO structure /// that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(ANIMATIONINFO). /// [SPCorrespondingType(typeof(ANIMATIONINFO), CorrespondingAction.Get)] SPI_GETANIMATION = 0x0048, /// /// Sets the animation effects associated with user actions. The pvParam parameter must point to an ANIMATIONINFO structure that /// contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(ANIMATIONINFO). /// [SPCorrespondingType(typeof(ANIMATIONINFO), CorrespondingAction.Set)] SPI_SETANIMATION = 0x0049, /// /// Determines whether the font smoothing feature is enabled. This feature uses font antialiasing to make font curves appear /// smoother by painting pixels at different gray levels. The pvParam parameter must point to a BOOL variable that receives TRUE /// if the feature is enabled, or FALSE if it is not. Windows 95: This flag is supported only if Windows Plus! is installed. See SPI_GETWINDOWSEXTENSION. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETFONTSMOOTHING = 0x004A, /// /// Enables or disables the font smoothing feature, which uses font antialiasing to make font curves appear smoother by painting /// pixels at different gray levels. To enable the feature, set the uiParam parameter to TRUE. To disable the feature, set /// uiParam to FALSE. Windows 95: This flag is supported only if Windows Plus! is installed. See SPI_GETWINDOWSEXTENSION. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETFONTSMOOTHING = 0x004B, /// /// Sets the width, in pixels, of the rectangle used to detect the start of a drag operation. Set uiParam to the new value. To /// retrieve the drag width, call GetSystemMetrics with the SM_CXDRAG flag. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, UiParam)] SPI_SETDRAGWIDTH = 0x004C, /// /// Sets the height, in pixels, of the rectangle used to detect the start of a drag operation. Set uiParam to the new value. To /// retrieve the drag height, call GetSystemMetrics with the SM_CYDRAG flag. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, UiParam)] SPI_SETDRAGHEIGHT = 0x004D, /// Used internally; applications should not use this value. [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETHANDHELD = 0x004E, /// /// Retrieves the time-out value for the low-power phase of screen saving. The pvParam parameter must point to an integer /// variable that receives the value. This flag is supported for 32-bit applications only. Windows NT, Windows Me/98: This flag /// is supported for 16-bit and 32-bit applications. Windows 95: This flag is supported for 16-bit applications only. /// [SPCorrespondingType(typeof(int), CorrespondingAction.Get)] SPI_GETLOWPOWERTIMEOUT = 0x004F, /// /// Retrieves the time-out value for the power-off phase of screen saving. The pvParam parameter must point to an integer /// variable that receives the value. This flag is supported for 32-bit applications only. Windows NT, Windows Me/98: This flag /// is supported for 16-bit and 32-bit applications. Windows 95: This flag is supported for 16-bit applications only. /// [SPCorrespondingType(typeof(int), CorrespondingAction.Get)] SPI_GETPOWEROFFTIMEOUT = 0x0050, /// /// Sets the time-out value, in seconds, for the low-power phase of screen saving. The uiParam parameter specifies the new value. /// The pvParam parameter must be null. This flag is supported for 32-bit applications only. Windows NT, Windows Me/98: This flag /// is supported for 16-bit and 32-bit applications. Windows 95: This flag is supported for 16-bit applications only. /// [SPCorrespondingType(typeof(int), CorrespondingAction.Set, UiParam)] SPI_SETLOWPOWERTIMEOUT = 0x0051, /// /// Sets the time-out value, in seconds, for the power-off phase of screen saving. The uiParam parameter specifies the new value. /// The pvParam parameter must be null. This flag is supported for 32-bit applications only. Windows NT, Windows Me/98: This flag /// is supported for 16-bit and 32-bit applications. Windows 95: This flag is supported for 16-bit applications only. /// [SPCorrespondingType(typeof(int), CorrespondingAction.Set, UiParam)] SPI_SETPOWEROFFTIMEOUT = 0x0052, /// /// Determines whether the low-power phase of screen saving is enabled. The pvParam parameter must point to a BOOL variable that /// receives TRUE if enabled, or FALSE if disabled. This flag is supported for 32-bit applications only. Windows NT, Windows /// Me/98: This flag is supported for 16-bit and 32-bit applications. Windows 95: This flag is supported for 16-bit applications only. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETLOWPOWERACTIVE = 0x0053, /// /// Determines whether the power-off phase of screen saving is enabled. The pvParam parameter must point to a BOOL variable that /// receives TRUE if enabled, or FALSE if disabled. This flag is supported for 32-bit applications only. Windows NT, Windows /// Me/98: This flag is supported for 16-bit and 32-bit applications. Windows 95: This flag is supported for 16-bit applications only. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETPOWEROFFACTIVE = 0x0054, /// /// Activates or deactivates the low-power phase of screen saving. Set uiParam to 1 to activate, or zero to deactivate. The /// pvParam parameter must be null. This flag is supported for 32-bit applications only. Windows NT, Windows Me/98: This flag is /// supported for 16-bit and 32-bit applications. Windows 95: This flag is supported for 16-bit applications only. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETLOWPOWERACTIVE = 0x0055, /// /// Activates or deactivates the power-off phase of screen saving. Set uiParam to 1 to activate, or zero to deactivate. The /// pvParam parameter must be null. This flag is supported for 32-bit applications only. Windows NT, Windows Me/98: This flag is /// supported for 16-bit and 32-bit applications. Windows 95: This flag is supported for 16-bit applications only. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETPOWEROFFACTIVE = 0x0056, /// Reloads the system cursors. Set the uiParam parameter to zero and the pvParam parameter to null. [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, UiParam)] SPI_SETCURSORS = 0x0057, /// Reloads the system icons. Set the uiParam parameter to zero and the pvParam parameter to null. [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, UiParam)] SPI_SETICONS = 0x0058, /// /// Retrieves the input locale identifier for the system default input language. The pvParam parameter must point to an HKL /// variable that receives this value. For more information, see Languages, Locales, and Keyboard Layouts on MSDN. /// [SPCorrespondingType(typeof(IntPtr), CorrespondingAction.Get)] SPI_GETDEFAULTINPUTLANG = 0x0059, /// /// Sets the default input language for the system shell and applications. The specified language must be displayable using the /// current system character set. The pvParam parameter must point to an HKL variable that contains the input locale identifier /// for the default language. For more information, see Languages, Locales, and Keyboard Layouts on MSDN. /// [SPCorrespondingType(typeof(IntPtr), CorrespondingAction.Set)] SPI_SETDEFAULTINPUTLANG = 0x005A, /// /// Sets the hot key set for switching between input languages. The uiParam and pvParam parameters are not used. The value sets /// the shortcut keys in the keyboard property sheets by reading the registry again. The registry must be set before this flag is /// used. the path in the registry is \HKEY_CURRENT_USER\keyboard layout\toggle. Valid values are "1" = ALT+SHIFT, "2" = /// CTRL+SHIFT, and "3" = none. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set)] SPI_SETLANGTOGGLE = 0x005B, /// /// Windows 95: Determines whether the Windows extension, Windows Plus!, is installed. Set the uiParam parameter to 1. The /// pvParam parameter is not used. The function returns TRUE if the extension is installed, or FALSE if it is not. /// [Obsolete, SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETWINDOWSEXTENSION = 0x005C, /// /// Enables or disables the Mouse Trails feature, which improves the visibility of mouse cursor movements by briefly showing a /// trail of cursors and quickly erasing them. To disable the feature, set the uiParam parameter to zero or 1. To enable the /// feature, set uiParam to a value greater than 1 to indicate the number of cursors drawn in the trail. Windows 2000/NT: This /// value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, UiParam)] SPI_SETMOUSETRAILS = 0x005D, /// /// Determines whether the Mouse Trails feature is enabled. This feature improves the visibility of mouse cursor movements by /// briefly showing a trail of cursors and quickly erasing them. The pvParam parameter must point to an integer variable that /// receives a value. If the value is zero or 1, the feature is disabled. If the value is greater than 1, the feature is enabled /// and the value indicates the number of cursors drawn in the trail. The uiParam parameter is not used. Windows 2000/NT: This /// value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETMOUSETRAILS = 0x005E, /// Windows Me/98: Used internally; applications should not use this flag. [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETSCREENSAVERRUNNING = 0x0061, /// Same as SPI_SETSCREENSAVERRUNNING. [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SCREENSAVERRUNNING = SPI_SETSCREENSAVERRUNNING, /// /// Retrieves information about the FilterKeys accessibility feature. The pvParam parameter must point to a FILTERKEYS structure /// that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(FILTERKEYS). /// [SPCorrespondingType(typeof(FILTERKEYS), CorrespondingAction.Get)] SPI_GETFILTERKEYS = 0x0032, /// /// Sets the parameters of the FilterKeys accessibility feature. The pvParam parameter must point to a FILTERKEYS structure that /// contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(FILTERKEYS). /// [SPCorrespondingType(typeof(FILTERKEYS), CorrespondingAction.Set)] SPI_SETFILTERKEYS = 0x0033, /// /// Retrieves information about the ToggleKeys accessibility feature. The pvParam parameter must point to a TOGGLEKEYS structure /// that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(TOGGLEKEYS). /// [SPCorrespondingType(typeof(TOGGLEKEYS), CorrespondingAction.Get)] SPI_GETTOGGLEKEYS = 0x0034, /// /// Sets the parameters of the ToggleKeys accessibility feature. The pvParam parameter must point to a TOGGLEKEYS structure that /// contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(TOGGLEKEYS). /// [SPCorrespondingType(typeof(TOGGLEKEYS), CorrespondingAction.Set)] SPI_SETTOGGLEKEYS = 0x0035, /// /// Retrieves information about the MouseKeys accessibility feature. The pvParam parameter must point to a MOUSEKEYS structure /// that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(MOUSEKEYS). /// [SPCorrespondingType(typeof(MOUSEKEYS), CorrespondingAction.Get)] SPI_GETMOUSEKEYS = 0x0036, /// /// Sets the parameters of the MouseKeys accessibility feature. The pvParam parameter must point to a MOUSEKEYS structure that /// contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(MOUSEKEYS). /// [SPCorrespondingType(typeof(MOUSEKEYS), CorrespondingAction.Set)] SPI_SETMOUSEKEYS = 0x0037, /// /// Determines whether the Show Sounds accessibility flag is on or off. If it is on, the user requires an application to present /// information visually in situations where it would otherwise present the information only in audible form. The pvParam /// parameter must point to a BOOL variable that receives TRUE if the feature is on, or FALSE if it is off. Using this value is /// equivalent to calling GetSystemMetrics (SM_SHOWSOUNDS). That is the recommended call. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETSHOWSOUNDS = 0x0038, /// /// Sets the parameters of the SoundSentry accessibility feature. The pvParam parameter must point to a SOUNDSENTRY structure /// that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(SOUNDSENTRY). /// [SPCorrespondingType(typeof(SOUNDSENTRY), CorrespondingAction.Set)] SPI_SETSHOWSOUNDS = 0x0039, /// /// Retrieves information about the StickyKeys accessibility feature. The pvParam parameter must point to a STICKYKEYS structure /// that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(STICKYKEYS). /// [SPCorrespondingType(typeof(STICKYKEYS), CorrespondingAction.Get)] SPI_GETSTICKYKEYS = 0x003A, /// /// Sets the parameters of the StickyKeys accessibility feature. The pvParam parameter must point to a STICKYKEYS structure that /// contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(STICKYKEYS). /// [SPCorrespondingType(typeof(STICKYKEYS), CorrespondingAction.Set)] SPI_SETSTICKYKEYS = 0x003B, /// /// Retrieves information about the time-out period associated with the accessibility features. The pvParam parameter must point /// to an ACCESSTIMEOUT structure that receives the information. Set the cbSize member of this structure and the uiParam /// parameter to sizeof(ACCESSTIMEOUT). /// [SPCorrespondingType(typeof(ACCESSTIMEOUT), CorrespondingAction.Get)] SPI_GETACCESSTIMEOUT = 0x003C, /// /// Sets the time-out period associated with the accessibility features. The pvParam parameter must point to an ACCESSTIMEOUT /// structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(ACCESSTIMEOUT). /// [SPCorrespondingType(typeof(ACCESSTIMEOUT), CorrespondingAction.Set)] SPI_SETACCESSTIMEOUT = 0x003D, //#if(WINVER >= 0x0400) /// /// Windows Me/98/95: Retrieves information about the SerialKeys accessibility feature. The pvParam parameter must point to a /// SERIALKEYS structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to /// sizeof(SERIALKEYS). Windows Server 2003, Windows XP/2000/NT: Not supported. The user controls this feature through the /// control panel. /// [Obsolete, SPCorrespondingType(typeof(SERIALKEYS), CorrespondingAction.Get)] SPI_GETSERIALKEYS = 0x003E, /// /// Windows Me/98/95: Sets the parameters of the SerialKeys accessibility feature. The pvParam parameter must point to a /// SERIALKEYS structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to /// sizeof(SERIALKEYS). Windows Server 2003, Windows XP/2000/NT: Not supported. The user controls this feature through the /// control panel. /// [Obsolete, SPCorrespondingType(typeof(SERIALKEYS), CorrespondingAction.Set)] SPI_SETSERIALKEYS = 0x003F, /// /// Retrieves information about the SoundSentry accessibility feature. The pvParam parameter must point to a SOUNDSENTRY /// structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(SOUNDSENTRY). /// [SPCorrespondingType(typeof(SOUNDSENTRY), CorrespondingAction.Get)] SPI_GETSOUNDSENTRY = 0x0040, /// /// Sets the parameters of the SoundSentry accessibility feature. The pvParam parameter must point to a SOUNDSENTRY structure /// that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(SOUNDSENTRY). /// [SPCorrespondingType(typeof(SOUNDSENTRY), CorrespondingAction.Set)] SPI_SETSOUNDSENTRY = 0x0041, /// /// Determines whether the snap-to-default-button feature is enabled. If enabled, the mouse cursor automatically moves to the /// default button, such as OK or Apply, of a dialog box. The pvParam parameter must point to a BOOL variable that receives TRUE /// if the feature is on, or FALSE if it is off. Windows 95: Not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETSNAPTODEFBUTTON = 0x005F, /// /// Enables or disables the snap-to-default-button feature. If enabled, the mouse cursor automatically moves to the default /// button, such as OK or Apply, of a dialog box. Set the uiParam parameter to TRUE to enable the feature, or FALSE to disable /// it. Applications should use the ShowWindow function when displaying a dialog box so the dialog manager can position the mouse /// cursor. Windows 95: Not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETSNAPTODEFBUTTON = 0x0060, /// /// Retrieves the width, in pixels, of the rectangle within which the mouse pointer has to stay for TrackMouseEvent to generate a /// WM_MOUSEHOVER message. The pvParam parameter must point to a UINT variable that receives the width. Windows 95: Not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETMOUSEHOVERWIDTH = 0x0062, /// /// Retrieves the width, in pixels, of the rectangle within which the mouse pointer has to stay for TrackMouseEvent to generate a /// WM_MOUSEHOVER message. The pvParam parameter must point to a UINT variable that receives the width. Windows 95: Not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set)] SPI_SETMOUSEHOVERWIDTH = 0x0063, /// /// Retrieves the height, in pixels, of the rectangle within which the mouse pointer has to stay for TrackMouseEvent to generate /// a WM_MOUSEHOVER message. The pvParam parameter must point to a UINT variable that receives the height. Windows 95: Not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETMOUSEHOVERHEIGHT = 0x0064, /// /// Sets the height, in pixels, of the rectangle within which the mouse pointer has to stay for TrackMouseEvent to generate a /// WM_MOUSEHOVER message. Set the uiParam parameter to the new height. Windows 95: Not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, UiParam)] SPI_SETMOUSEHOVERHEIGHT = 0x0065, /// /// Retrieves the time, in milliseconds, that the mouse pointer has to stay in the hover rectangle for TrackMouseEvent to /// generate a WM_MOUSEHOVER message. The pvParam parameter must point to a UINT variable that receives the time. Windows 95: Not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETMOUSEHOVERTIME = 0x0066, /// /// Sets the time, in milliseconds, that the mouse pointer has to stay in the hover rectangle for TrackMouseEvent to generate a /// WM_MOUSEHOVER message. This is used only if you pass HOVER_DEFAULT in the dwHoverTime parameter in the call to /// TrackMouseEvent. Set the uiParam parameter to the new time. Windows 95: Not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, UiParam)] SPI_SETMOUSEHOVERTIME = 0x0067, /// /// Retrieves the number of lines to scroll when the mouse wheel is rotated. The pvParam parameter must point to a UINT variable /// that receives the number of lines. The default value is 3. Windows 95: Not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETWHEELSCROLLLINES = 0x0068, /// /// Sets the number of lines to scroll when the mouse wheel is rotated. The number of lines is set from the uiParam parameter. /// The number of lines is the suggested number of lines to scroll when the mouse wheel is rolled without using modifier keys. If /// the number is 0, then no scrolling should occur. If the number of lines to scroll is greater than the number of lines /// viewable, and in particular if it is WHEEL_PAGESCROLL (#defined as UINT_MAX), the scroll operation should be interpreted as /// clicking once in the page down or page up regions of the scroll bar. Windows 95: Not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, UiParam)] SPI_SETWHEELSCROLLLINES = 0x0069, /// /// Retrieves the time, in milliseconds, that the system waits before displaying a shortcut menu when the mouse cursor is over a /// submenu item. The pvParam parameter must point to a DWORD variable that receives the time of the delay. Windows 95: Not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETMENUSHOWDELAY = 0x006A, /// /// Sets uiParam to the time, in milliseconds, that the system waits before displaying a shortcut menu when the mouse cursor is /// over a submenu item. Windows 95: Not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, UiParam)] SPI_SETMENUSHOWDELAY = 0x006B, /// /// Determines whether the IME status window is visible (on a per-user basis). The pvParam parameter must point to a BOOL /// variable that receives TRUE if the status window is visible, or FALSE if it is not. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETSHOWIMEUI = 0x006E, /// /// Sets whether the IME status window is visible or not on a per-user basis. The uiParam parameter specifies TRUE for on or /// FALSE for off. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETSHOWIMEUI = 0x006F, /// /// Retrieves the current mouse speed. The mouse speed determines how far the pointer will move based on the distance the mouse /// moves. The pvParam parameter must point to an integer that receives a value which ranges between 1 (slowest) and 20 /// (fastest). A value of 10 is the default. The value can be set by an end user using the mouse control panel application or by /// an application using SPI_SETMOUSESPEED. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETMOUSESPEED = 0x0070, /// /// Sets the current mouse speed. The pvParam parameter is an integer between 1 (slowest) and 20 (fastest). A value of 10 is the /// default. This value is typically set using the mouse control panel application. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, Direct)] SPI_SETMOUSESPEED = 0x0071, /// /// Determines whether a screen saver is currently running on the window station of the calling process. The pvParam parameter /// must point to a BOOL variable that receives TRUE if a screen saver is currently running, or FALSE otherwise. Note that only /// the interactive window station, "WinSta0", can have a screen saver running. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETSCREENSAVERRUNNING = 0x0072, /// /// Retrieves the full path of the bitmap file for the desktop wallpaper. The pvParam parameter must point to a buffer that /// receives a null-terminated path string. Set the uiParam parameter to the size, in characters, of the pvParam buffer. The /// returned string will not exceed MAX_PATH characters. If there is no desktop wallpaper, the returned string is empty. Windows /// NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(string), CorrespondingAction.Get)] SPI_GETDESKWALLPAPER = 0x0073, /// /// Determines whether audio descriptions are enabled or disabled. The pvParam parameter is a pointer to an AUDIODESCRIPTION /// structure. Set the cbSize member of this structure and the uiParam parameter to sizeof(AUDIODESCRIPTION). /// /// While it is possible for users who have visual impairments to hear the audio in video content, there is a lot of action in /// video that does not have corresponding audio. Specific audio description of what is happening in a video helps these users /// understand the content better. This flag enables you to determine whether audio descriptions have been enabled and in which language. /// /// Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(AUDIODESCRIPTION), CorrespondingAction.Get)] SPI_GETAUDIODESCRIPTION = 0x0074, /// /// Turns the audio descriptions feature on or off. The pvParam parameter is a pointer to an AUDIODESCRIPTION structure. /// /// While it is possible for users who are visually impaired to hear the audio in video content, there is a lot of action in /// video that does not have corresponding audio. Specific audio description of what is happening in a video helps these users /// understand the content better. This flag enables you to enable or disable audio descriptions in the languages they are /// provided in. /// /// Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(AUDIODESCRIPTION), CorrespondingAction.Set)] SPI_SETAUDIODESCRIPTION = 0x0075, /// /// Determines whether the screen saver requires a password to display the Windows desktop. The pvParam parameter must point to a /// BOOL variable that receives TRUE if the screen saver requires a password, or FALSE otherwise. The uiParam parameter is /// ignored. Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETSCREENSAVESECURE = 0x0076, /// /// Sets whether the screen saver requires the user to enter a password to display the Windows desktop. The uiParam parameter is /// a BOOL variable. The pvParam parameter is ignored. Set uiParam to TRUE to require a password, or FALSE to not require a password. /// If the machine has entered power saving mode or system lock state, an ERROR_OPERATION_IN_PROGRESS exception occurs. /// Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETSCREENSAVESECURE = 0x0077, /// /// Retrieves the number of milliseconds that a thread can go without dispatching a message before the system considers it /// unresponsive. The pvParam parameter must point to an integer variable that receives the value. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [Obsolete, SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETHUNGAPPTIMEOUT = 0x0078, /// /// Sets the hung application time-out to the value of the uiParam parameter. This value is the number of milliseconds that a /// thread can go without dispatching a message before the system considers it unresponsive. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [Obsolete, SPCorrespondingType(typeof(uint), CorrespondingAction.Set, UiParam)] SPI_SETHUNGAPPTIMEOUT = 0x0079, /// /// Retrieves the number of milliseconds that the system waits before terminating an application that does not respond to a /// shutdown request. The pvParam parameter must point to an integer variable that receives the value. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [Obsolete, SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETWAITTOKILLTIMEOUT = 0x007A, /// /// Sets the application shutdown request time-out to the value of the uiParam parameter. This value is the number of /// milliseconds that the system waits before terminating an application that does not respond to a shutdown request. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [Obsolete, SPCorrespondingType(typeof(uint), CorrespondingAction.Set, UiParam)] SPI_SETWAITTOKILLTIMEOUT = 0x007B, /// /// Retrieves the number of milliseconds that the service control manager waits before terminating a service that does not /// respond to a shutdown request. The pvParam parameter must point to an integer variable that receives the value. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [Obsolete, SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETWAITTOKILLSERVICETIMEOUT = 0x007C, /// /// Sets the service shutdown request time-out to the value of the uiParam parameter. This value is the number of milliseconds /// that the system waits before terminating a service that does not respond to a shutdown request. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [Obsolete, SPCorrespondingType(typeof(uint), CorrespondingAction.Set, UiParam)] SPI_SETWAITTOKILLSERVICETIMEOUT = 0x007D, /// /// Retrieves the threshold in pixels where docking behavior is triggered by using a mouse to drag a window to the edge of a /// monitor or monitor array. The default threshold is 1. The pvParam parameter must point to a DWORD variable that receives the value. /// Use SPI_GETWINARRANGING to determine whether this behavior is enabled. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETMOUSEDOCKTHRESHOLD = 0x007E, /// /// Sets the threshold in pixels where docking behavior is triggered by using a mouse to drag a window to the edge of a monitor /// or monitor array. The default threshold is 1. The pvParam parameter must point to a DWORD variable that contains the new value. /// SPI_GETWINARRANGING must be TRUE to enable this behavior. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set)] SPI_SETMOUSEDOCKTHRESHOLD = 0x007F, /// /// Retrieves the threshold in pixels where docking behavior is triggered by using a pen to drag a window to the edge of a /// monitor or monitor array. The default is 30. /// Use SPI_GETWINARRANGING to determine whether this behavior is enabled. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETPENDOCKTHRESHOLD = 0x0080, /// /// Sets the threshold in pixels where docking behavior is triggered by using a pen to drag a window to the edge of a monitor or /// monitor array. The default threshold is 30. The pvParam parameter must point to a DWORD variable that contains the new value. /// SPI_GETWINARRANGING must be TRUE to enable this behavior. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set)] SPI_SETPENDOCKTHRESHOLD = 0x0081, /// /// Determines whether window arrangement is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE if /// enabled, or FALSE otherwise. /// /// Window arrangement reduces the number of mouse, pen, or touch interactions needed to move and size top-level windows by /// simplifying the default behavior of a window when it is dragged or sized. /// /// The following parameters retrieve individual window arrangement settings: /// /// /// SPI_GETDOCKMOVING /// /// /// SPI_GETMOUSEDOCKTHRESHOLD /// /// /// SPI_GETMOUSEDRAGOUTTHRESHOLD /// /// /// SPI_GETMOUSESIDEMOVETHRESHOLD /// /// /// SPI_GETPENDOCKTHRESHOLD /// /// /// SPI_GETPENDRAGOUTTHRESHOLD /// /// /// SPI_GETPENSIDEMOVETHRESHOLD /// /// /// SPI_GETSNAPSIZING /// /// /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETWINARRANGING = 0x0082, /// /// Sets whether window arrangement is enabled. Set pvParam to TRUE for on or FALSE for off. /// /// Window arrangement reduces the number of mouse, pen, or touch interactions needed to move and size top-level windows by /// simplifying the default behavior of a window when it is dragged or sized. /// /// The following parameters retrieve individual window arrangement settings: /// /// /// SPI_GETDOCKMOVING /// /// /// SPI_GETMOUSEDOCKTHRESHOLD /// /// /// SPI_GETMOUSEDRAGOUTTHRESHOLD /// /// /// SPI_GETMOUSESIDEMOVETHRESHOLD /// /// /// SPI_GETPENDOCKTHRESHOLD /// /// /// SPI_GETPENDRAGOUTTHRESHOLD /// /// /// SPI_GETPENSIDEMOVETHRESHOLD /// /// /// SPI_GETSNAPSIZING /// /// /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETWINARRANGING = 0x0083, /// /// Retrieves the threshold in pixels where undocking behavior is triggered by using a mouse to drag a window from the edge of a /// monitor or a monitor array toward the center. The default threshold is 20. /// Use SPI_GETWINARRANGING to determine whether this behavior is enabled. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETMOUSEDRAGOUTTHRESHOLD = 0x0084, /// /// Sets the threshold in pixels where undocking behavior is triggered by using a mouse to drag a window from the edge of a /// monitor or monitor array to its center. The default threshold is 20. The pvParam parameter must point to a DWORD variable /// that contains the new value. /// SPI_GETWINARRANGING must be TRUE to enable this behavior. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set)] SPI_SETMOUSEDRAGOUTTHRESHOLD = 0x0085, /// /// Retrieves the threshold in pixels where undocking behavior is triggered by using a pen to drag a window from the edge of a /// monitor or monitor array toward its center. The default threshold is 30. /// Use SPI_GETWINARRANGING to determine whether this behavior is enabled. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETPENDRAGOUTTHRESHOLD = 0x0086, /// /// Sets the threshold in pixels where undocking behavior is triggered by using a pen to drag a window from the edge of a monitor /// or monitor array to its center. The default threshold is 30. The pvParam parameter must point to a DWORD variable that /// contains the new value. /// SPI_GETWINARRANGING must be TRUE to enable this behavior. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set)] SPI_SETPENDRAGOUTTHRESHOLD = 0x0087, /// /// Retrieves the threshold in pixels from the top of a monitor or a monitor array where a vertically maximized window is /// restored when dragged with the mouse. The default threshold is 50. /// Use SPI_GETWINARRANGING to determine whether this behavior is enabled. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETMOUSESIDEMOVETHRESHOLD = 0x0088, /// /// Sets the threshold in pixels from the top of the monitor where a vertically maximized window is restored when dragged with /// the mouse. The default threshold is 50. The pvParam parameter must point to a DWORD variable that contains the new value. /// SPI_GETWINARRANGING must be TRUE to enable this behavior. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set)] SPI_SETMOUSESIDEMOVETHRESHOLD = 0x0089, /// /// Retrieves the threshold in pixels from the top of a monitor or monitor array where a vertically maximized window is restored /// when dragged with the mouse. The default threshold is 50. /// Use SPI_GETWINARRANGING to determine whether this behavior is enabled. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETPENSIDEMOVETHRESHOLD = 0x008A, /// /// Sets the threshold in pixels from the top of the monitor where a vertically maximized window is restored when dragged with a /// pen. The default threshold is 50. The pvParam parameter must point to a DWORD variable that contains the new value. /// SPI_GETWINARRANGING must be TRUE to enable this behavior. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set)] SPI_SETPENSIDEMOVETHRESHOLD = 0x008B, /// /// Determines whether a maximized window is restored when its caption bar is dragged. The pvParam parameter must point to a BOOL /// variable that receives TRUE if enabled, or FALSE otherwise. /// Use SPI_GETWINARRANGING to determine whether this behavior is enabled. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETDRAGFROMMAXIMIZE = 0x008C, /// /// Sets whether a maximized window is restored when its caption bar is dragged. Set pvParam to TRUE for on or FALSE for off. /// SPI_GETWINARRANGING must be TRUE to enable this behavior. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETDRAGFROMMAXIMIZE = 0x008D, /// /// Determines whether a window is vertically maximized when it is sized to the top or bottom of a monitor or monitor array. The /// pvParam parameter must point to a BOOL variable that receives TRUE if enabled, or FALSE otherwise. /// Use SPI_GETWINARRANGING to determine whether this behavior is enabled. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETSNAPSIZING = 0x008E, /// /// Sets whether a window is vertically maximized when it is sized to the top or bottom of the monitor. Set pvParam to TRUE for /// on or FALSE for off. /// SPI_GETWINARRANGING must be TRUE to enable this behavior. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETSNAPSIZING = 0x008F, /// /// Determines whether a window is docked when it is moved to the top, left, or right edges of a monitor or monitor array. The /// pvParam parameter must point to a BOOL variable that receives TRUE if enabled, or FALSE otherwise. /// Use SPI_GETWINARRANGING to determine whether this behavior is enabled. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETDOCKMOVING = 0x0090, /// /// Sets whether a window is docked when it is moved to the top, left, or right docking targets on a monitor or monitor array. /// Set pvParam to TRUE for on or FALSE for off. /// SPI_GETWINARRANGING must be TRUE to enable this behavior. /// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETDOCKMOVING = 0x0091, /// Undocumented SPI_GETTOUCHPREDICTIONPARAMETERS = 0x009C, /// Undocumented SPI_SETTOUCHPREDICTIONPARAMETERS = 0x009D, /// /// Retrieves a value that determines whether Windows 8 is displaying apps using the default scaling plateau for the hardware or /// going to the next higher plateau. This value is based on the current "Make everything on your screen bigger" setting, found /// in the Ease of Access section of PC /// settings: 1 is on, 0 is off. /// /// Apps can provide text and image resources for each of several scaling plateaus: 100%, 140%, and 180%. Providing separate /// resources optimized for a particular scale avoids distortion due to resizing. Windows 8 determines the appropriate scaling /// plateau based on a number of factors, including screen size and pixel density. When "Make everything on your screen bigger" /// is selected (SPI_GETLOGICALDPIOVERRIDE returns a value of 1), Windows uses resources from the next higher plateau.For /// example, in the case of hardware that Windows determines should use a scale of SCALE_100_PERCENT, this override causes /// Windows to use the SCALE_140_PERCENT scale value, assuming that it does not violate other constraints. /// /// You should not use this value.It might be altered or unavailable in subsequent versions of Windows. /// Instead, use the GetScaleFactorForDevice function or the DisplayProperties class to retrieve the preferred scaling /// factor.Desktop applications should use desktop logical DPI rather than scale factor.Desktop logical DPI can be retrieved /// through the GetDeviceCaps function. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETLOGICALDPIOVERRIDE = 0x009E, /// Do not use. [SPCorrespondingType(typeof(bool), CorrespondingAction.Set)] SPI_SETLOGICALDPIOVERRIDE = 0x009F, /// Undocumented SPI_GETMENURECT = 0x00A2, /// Undocumented SPI_SETMENURECT = 0x00A3, /// /// Determines whether active window tracking (activating the window the mouse is on) is on or off. The pvParam parameter must /// point to a BOOL variable that receives TRUE for on, or FALSE for off. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETACTIVEWINDOWTRACKING = 0x1000, /// /// Sets active window tracking (activating the window the mouse is on) either on or off. Set pvParam to TRUE for on or FALSE for /// off. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETACTIVEWINDOWTRACKING = 0x1001, /// /// Determines whether the menu animation feature is enabled. This master switch must be on to enable menu animation effects. The /// pvParam parameter must point to a BOOL variable that receives TRUE if animation is enabled and FALSE if it is disabled. If /// animation is enabled, SPI_GETMENUFADE indicates whether menus use fade or slide animation. Windows NT, Windows 95: This value /// is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETMENUANIMATION = 0x1002, /// /// Enables or disables menu animation. This master switch must be on for any menu animation to occur. The pvParam parameter is a /// BOOL variable; set pvParam to TRUE to enable animation and FALSE to disable animation. If animation is enabled, /// SPI_GETMENUFADE indicates whether menus use fade or slide animation. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETMENUANIMATION = 0x1003, /// /// Determines whether the slide-open effect for combo boxes is enabled. The pvParam parameter must point to a BOOL variable that /// receives TRUE for enabled, or FALSE for disabled. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETCOMBOBOXANIMATION = 0x1004, /// /// Enables or disables the slide-open effect for combo boxes. Set the pvParam parameter to TRUE to enable the gradient effect, /// or FALSE to disable it. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETCOMBOBOXANIMATION = 0x1005, /// /// Determines whether the smooth-scrolling effect for list boxes is enabled. The pvParam parameter must point to a BOOL variable /// that receives TRUE for enabled, or FALSE for disabled. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETLISTBOXSMOOTHSCROLLING = 0x1006, /// /// Enables or disables the smooth-scrolling effect for list boxes. Set the pvParam parameter to TRUE to enable the /// smooth-scrolling effect, or FALSE to disable it. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETLISTBOXSMOOTHSCROLLING = 0x1007, /// /// Determines whether the gradient effect for window title bars is enabled. The pvParam parameter must point to a BOOL variable /// that receives TRUE for enabled, or FALSE for disabled. For more information about the gradient effect, see the GetSysColor /// function. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETGRADIENTCAPTIONS = 0x1008, /// /// Enables or disables the gradient effect for window title bars. Set the pvParam parameter to TRUE to enable it, or FALSE to /// disable it. The gradient effect is possible only if the system has a color depth of more than 256 colors. For more /// information about the gradient effect, see the GetSysColor function. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETGRADIENTCAPTIONS = 0x1009, /// /// Determines whether menu access keys are always underlined. The pvParam parameter must point to a BOOL variable that receives /// TRUE if menu access keys are always underlined, and FALSE if they are underlined only when the menu is activated by the /// keyboard. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETKEYBOARDCUES = 0x100A, /// /// Sets the underlining of menu access key letters. The pvParam parameter is a BOOL variable. Set pvParam to TRUE to always /// underline menu access keys, or FALSE to underline menu access keys only when the menu is activated from the keyboard. Windows /// NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETKEYBOARDCUES = 0x100B, /// Same as SPI_GETKEYBOARDCUES. [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETMENUUNDERLINES = SPI_GETKEYBOARDCUES, /// Same as SPI_SETKEYBOARDCUES. [SPCorrespondingType(typeof(bool), CorrespondingAction.Set)] SPI_SETMENUUNDERLINES = SPI_SETKEYBOARDCUES, /// /// Determines whether windows activated through active window tracking will be brought to the top. The pvParam parameter must /// point to a BOOL variable that receives TRUE for on, or FALSE for off. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETACTIVEWNDTRKZORDER = 0x100C, /// /// Determines whether or not windows activated through active window tracking should be brought to the top. Set pvParam to TRUE /// for on or FALSE for off. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETACTIVEWNDTRKZORDER = 0x100D, /// /// Determines whether hot tracking of user-interface elements, such as menu names on menu bars, is enabled. The pvParam /// parameter must point to a BOOL variable that receives TRUE for enabled, or FALSE for disabled. Hot tracking means that when /// the cursor moves over an item, it is highlighted but not selected. You can query this value to decide whether to use hot /// tracking in the user interface of your application. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETHOTTRACKING = 0x100E, /// /// Enables or disables hot tracking of user-interface elements such as menu names on menu bars. Set the pvParam parameter to /// TRUE to enable it, or FALSE to disable it. Hot-tracking means that when the cursor moves over an item, it is highlighted but /// not selected. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETHOTTRACKING = 0x100F, /// /// Determines whether menu fade animation is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE /// when fade animation is enabled and FALSE when it is disabled. If fade animation is disabled, menus use slide animation. This /// flag is ignored unless menu animation is enabled, which you can do using the SPI_SETMENUANIMATION flag. For more information, /// see AnimateWindow. Windows NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETMENUFADE = 0x1012, /// /// Enables or disables menu fade animation. Set pvParam to TRUE to enable the menu fade effect or FALSE to disable it. If fade /// animation is disabled, menus use slide animation. he The menu fade effect is possible only if the system has a color depth of /// more than 256 colors. This flag is ignored unless SPI_MENUANIMATION is also set. For more information, see AnimateWindow. /// Windows NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETMENUFADE = 0x1013, /// /// Determines whether the selection fade effect is enabled. The pvParam parameter must point to a BOOL variable that receives /// TRUE if enabled or FALSE if disabled. The selection fade effect causes the menu item selected by the user to remain on the /// screen briefly while fading out after the menu is dismissed. Windows NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETSELECTIONFADE = 0x1014, /// /// Set pvParam to TRUE to enable the selection fade effect or FALSE to disable it. The selection fade effect causes the menu /// item selected by the user to remain on the screen briefly while fading out after the menu is dismissed. The selection fade /// effect is possible only if the system has a color depth of more than 256 colors. Windows NT, Windows Me/98/95: This value is /// not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETSELECTIONFADE = 0x1015, /// /// Determines whether ToolTip animation is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE if /// enabled or FALSE if disabled. If ToolTip animation is enabled, SPI_GETTOOLTIPFADE indicates whether ToolTips use fade or /// slide animation. Windows NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETTOOLTIPANIMATION = 0x1016, /// /// Set pvParam to TRUE to enable ToolTip animation or FALSE to disable it. If enabled, you can use SPI_SETTOOLTIPFADE to specify /// fade or slide animation. Windows NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETTOOLTIPANIMATION = 0x1017, /// /// If SPI_SETTOOLTIPANIMATION is enabled, SPI_GETTOOLTIPFADE indicates whether ToolTip animation uses a fade effect or a slide /// effect. The pvParam parameter must point to a BOOL variable that receives TRUE for fade animation or FALSE for slide /// animation. For more information on slide and fade effects, see AnimateWindow. Windows NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETTOOLTIPFADE = 0x1018, /// /// If the SPI_SETTOOLTIPANIMATION flag is enabled, use SPI_SETTOOLTIPFADE to indicate whether ToolTip animation uses a fade /// effect or a slide effect. Set pvParam to TRUE for fade animation or FALSE for slide animation. The tooltip fade effect is /// possible only if the system has a color depth of more than 256 colors. For more information on the slide and fade effects, /// see the AnimateWindow function. Windows NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETTOOLTIPFADE = 0x1019, /// /// Determines whether the cursor has a shadow around it. The pvParam parameter must point to a BOOL variable that receives TRUE /// if the shadow is enabled, FALSE if it is disabled. This effect appears only if the system has a color depth of more than 256 /// colors. Windows NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETCURSORSHADOW = 0x101A, /// /// Enables or disables a shadow around the cursor. The pvParam parameter is a BOOL variable. Set pvParam to TRUE to enable the /// shadow or FALSE to disable the shadow. This effect appears only if the system has a color depth of more than 256 colors. /// Windows NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETCURSORSHADOW = 0x101B, /// /// Retrieves the state of the Mouse Sonar feature. The pvParam parameter must point to a BOOL variable that receives TRUE if /// enabled or FALSE otherwise. For more information, see About Mouse Input on MSDN. Windows 2000/NT, Windows 98/95: This value /// is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETMOUSESONAR = 0x101C, /// /// Turns the Sonar accessibility feature on or off. This feature briefly shows several concentric circles around the mouse /// pointer when the user presses and releases the CTRL key. The pvParam parameter specifies TRUE for on and FALSE for off. The /// default is off. For more information, see About Mouse Input. Windows 2000/NT, Windows 98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETMOUSESONAR = 0x101D, /// /// Retrieves the state of the Mouse ClickLock feature. The pvParam parameter must point to a BOOL variable that receives TRUE if /// enabled, or FALSE otherwise. For more information, see About Mouse Input. Windows 2000/NT, Windows 98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETMOUSECLICKLOCK = 0x101E, /// /// Turns the Mouse ClickLock accessibility feature on or off. This feature temporarily locks down the primary mouse button when /// that button is clicked and held down for the time specified by SPI_SETMOUSECLICKLOCKTIME. The uiParam parameter specifies /// TRUE for on, or FALSE for off. The default is off. For more information, see Remarks and About Mouse Input on MSDN. Windows /// 2000/NT, Windows 98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETMOUSECLICKLOCK = 0x101F, /// /// Retrieves the state of the Mouse Vanish feature. The pvParam parameter must point to a BOOL variable that receives TRUE if /// enabled or FALSE otherwise. For more information, see About Mouse Input on MSDN. Windows 2000/NT, Windows 98/95: This value /// is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETMOUSEVANISH = 0x1020, /// /// Turns the Vanish feature on or off. This feature hides the mouse pointer when the user types; the pointer reappears when the /// user moves the mouse. The pvParam parameter specifies TRUE for on and FALSE for off. The default is off. For more /// information, see About Mouse Input on MSDN. Windows 2000/NT, Windows 98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETMOUSEVANISH = 0x1021, /// /// Determines whether native User menus have flat menu appearance. The pvParam parameter must point to a BOOL variable that /// returns TRUE if the flat menu appearance is set, or FALSE otherwise. Windows 2000/NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETFLATMENU = 0x1022, /// /// Enables or disables flat menu appearance for native User menus. Set pvParam to TRUE to enable flat menu appearance or FALSE /// to disable it. When enabled, the menu bar uses COLOR_MENUBAR for the menubar background, COLOR_MENU for the menu-popup /// background, COLOR_MENUHILIGHT for the fill of the current menu selection, and COLOR_HILIGHT for the outline of the current /// menu selection. If disabled, menus are drawn using the same metrics and colors as in Windows 2000 and earlier. Windows /// 2000/NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETFLATMENU = 0x1023, /// /// Determines whether the drop shadow effect is enabled. The pvParam parameter must point to a BOOL variable that returns TRUE /// if enabled or FALSE if disabled. Windows 2000/NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETDROPSHADOW = 0x1024, /// /// Enables or disables the drop shadow effect. Set pvParam to TRUE to enable the drop shadow effect or FALSE to disable it. You /// must also have CS_DROPSHADOW in the window class style. Windows 2000/NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETDROPSHADOW = 0x1025, /// /// Retrieves a BOOL indicating whether an application can reset the screensaver's timer by calling the SendInput function to /// simulate keyboard or mouse input. The pvParam parameter must point to a BOOL variable that receives TRUE if the simulated /// input will be blocked, or FALSE otherwise. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETBLOCKSENDINPUTRESETS = 0x1026, /// /// Determines whether an application can reset the screensaver's timer by calling the SendInput function to simulate keyboard or /// mouse input. The uiParam parameter specifies TRUE if the screensaver will not be deactivated by simulated input, or FALSE if /// the screensaver will be deactivated by simulated input. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, UiParam)] SPI_SETBLOCKSENDINPUTRESETS = 0x1027, /// /// Determines whether UI effects are enabled or disabled. The pvParam parameter must point to a BOOL variable that receives TRUE /// if all UI effects are enabled, or FALSE if they are disabled. Windows NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETUIEFFECTS = 0x103E, /// /// Enables or disables UI effects. Set the pvParam parameter to TRUE to enable all UI effects or FALSE to disable all UI /// effects. Windows NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETUIEFFECTS = 0x103F, /// /// Determines whether overlapped content is enabled or disabled. The pvParam parameter must point to a BOOL variable that /// receives TRUE if enabled, or FALSE otherwise. /// /// Display features such as background images, textured backgrounds, water marks on documents, alpha blending, and transparency /// can reduce the contrast between the foreground and background, making it harder for users with low vision to see objects on /// the screen. This flag enables you to determine whether such overlapped content has been disabled. /// /// Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETDISABLEOVERLAPPEDCONTENT = 0x1040, /// /// Turns overlapped content (such as background images and watermarks) on or off. The pvParam parameter is a BOOL variable. Set /// pvParam to TRUE to disable overlapped content, or FALSE to enable overlapped content. /// /// Display features such as background images, textured backgrounds, water marks on documents, alpha blending, and transparency /// can reduce the contrast between the foreground and background, making it harder for users with low vision to see objects on /// the screen. This flag enables you to determine whether such overlapped content has been disabled. /// /// Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETDISABLEOVERLAPPEDCONTENT = 0x1041, /// /// Determines whether animations are enabled or disabled. The pvParam parameter must point to a BOOL variable that receives TRUE /// if animations are enabled, or FALSE otherwise. /// /// Display features such as flashing, blinking, flickering, and moving content can cause seizures in users with photo-sensitive /// epilepsy. This flag enables you to determine whether such animations have been disabled in the client area. /// /// Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETCLIENTAREAANIMATION = 0x1042, /// /// Turns client area animations on or off. The pvParam parameter is a BOOL variable. Set pvParam to TRUE to enable animations /// and other transient effects in the client area, or FALSE to disable them. /// /// Display features such as flashing, blinking, flickering, and moving content can cause seizures in users with photo-sensitive /// epilepsy. This flag enables you to determine whether such animations have been disabled in the client area. /// /// Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETCLIENTAREAANIMATION = 0x1043, /// /// Determines whether ClearType is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE if ClearType /// is enabled, or FALSE otherwise. /// ClearType is a software technology that improves the readability of text on liquid crystal display (LCD) monitors. /// Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETCLEARTYPE = 0x1048, /// /// Turns ClearType on or off. The pvParam parameter is a BOOL variable. Set pvParam to TRUE to enable ClearType, or FALSE to /// disable it. /// ClearType is a software technology that improves the readability of text on liquid crystal display (LCD) monitors. /// Windows Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETCLEARTYPE = 0x1049, /// Undocumented SPI_GETSPEECHRECOGNITION = 0x104A, /// Undocumented SPI_SETSPEECHRECOGNITION = 0x104B, /// Undocumented SPI_GETCARETBROWSING = 0x104C, /// Undocumented SPI_SETCARETBROWSING = 0x104D, /// /// Starting with Windows 8: Determines whether the active input settings have Local (per-thread, TRUE) or Global /// (session, FALSE) scope. The pvParam parameter must point to a BOOL variable. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETTHREADLOCALINPUTSETTINGS = 0x104E, /// /// Starting with Windows 8: Determines whether the active input settings have Local (per-thread, TRUE) or Global /// (session, FALSE) scope. The pvParam parameter must point to a BOOL variable, casted by PVOID. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETTHREADLOCALINPUTSETTINGS = 0x104F, /// /// Starting with Windows 8: Determines whether the system language bar is enabled or disabled. The pvParam parameter must /// point to a BOOL variable that receives TRUE if the language bar is enabled, or FALSE otherwise. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Get)] SPI_GETSYSTEMLANGUAGEBAR = 0x1050, /// /// Starting with Windows 8: Turns the legacy language bar feature on or off. The pvParam parameter is a pointer to a BOOL /// variable. Set pvParam to TRUE to enable the legacy language bar, or FALSE to disable it. The flag is supported on Windows 8 /// where the legacy language bar is replaced by Input Switcher and therefore turned off by default. Turning the legacy language /// bar on is provided for compatibility reasons and has no effect on the Input Switcher. /// [SPCorrespondingType(typeof(bool), CorrespondingAction.Set, Direct)] SPI_SETSYSTEMLANGUAGEBAR = 0x1051, /// /// Retrieves the amount of time following user input, in milliseconds, during which the system will not allow applications to /// force themselves into the foreground. The pvParam parameter must point to a DWORD variable that receives the time. Windows /// NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETFOREGROUNDLOCKTIMEOUT = 0x2000, /// /// Sets the amount of time following user input, in milliseconds, during which the system does not allow applications to force /// themselves into the foreground. Set pvParam to the new timeout value. The calling thread must be able to change the /// foreground window, otherwise the call fails. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, Direct)] SPI_SETFOREGROUNDLOCKTIMEOUT = 0x2001, /// /// Retrieves the active window tracking delay, in milliseconds. The pvParam parameter must point to a DWORD variable that /// receives the time. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETACTIVEWNDTRKTIMEOUT = 0x2002, /// /// Sets the active window tracking delay. Set pvParam to the number of milliseconds to delay before activating the window under /// the mouse pointer. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, Direct)] SPI_SETACTIVEWNDTRKTIMEOUT = 0x2003, /// /// Retrieves the number of times SetForegroundWindow will flash the taskbar button when rejecting a foreground switch request. /// The pvParam parameter must point to a DWORD variable that receives the value. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETFOREGROUNDFLASHCOUNT = 0x2004, /// /// Sets the number of times SetForegroundWindow will flash the taskbar button when rejecting a foreground switch request. Set /// pvParam to the number of times to flash. Windows NT, Windows 95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, Direct)] SPI_SETFOREGROUNDFLASHCOUNT = 0x2005, /// /// Retrieves the caret width in edit controls, in pixels. The pvParam parameter must point to a DWORD that receives this value. /// Windows NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETCARETWIDTH = 0x2006, /// /// Sets the caret width in edit controls. Set pvParam to the desired width, in pixels. The default and minimum value is 1. /// Windows NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, Direct)] SPI_SETCARETWIDTH = 0x2007, /// /// Retrieves the time delay before the primary mouse button is locked. The pvParam parameter must point to DWORD that receives /// the time delay. This is only enabled if SPI_SETMOUSECLICKLOCK is set to TRUE. For more information, see About Mouse Input on /// MSDN. Windows 2000/NT, Windows 98/95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETMOUSECLICKLOCKTIME = 0x2008, /// /// Adjusts the time delay before the primary mouse button is locked. The uiParam parameter should be set to 0. The pvParam /// parameter points to a DWORD that specifies the time delay in milliseconds. For example, specify 1000 for a 1 second delay. /// The default is 1200. For more information, see About Mouse Input. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set)] SPI_SETMOUSECLICKLOCKTIME = 0x2009, /// /// Retrieves the type of font smoothing. The pvParam parameter must point to a UINT that receives the information. Windows /// 2000/NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETFONTSMOOTHINGTYPE = 0x200A, /// /// Sets the font smoothing type. The pvParam parameter is either FE_FONTSMOOTHINGSTANDARD, if standard anti-aliasing is used, /// or FE_FONTSMOOTHINGCLEARTYPE, if ClearType is used. The default is FE_FONTSMOOTHINGSTANDARD. /// SPI_SETFONTSMOOTHING must also be set. /// Windows 2000: This parameter is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, Direct)] SPI_SETFONTSMOOTHINGTYPE = 0x200B, /// /// Retrieves a contrast value that is used in ClearType™ smoothing. The pvParam parameter must point to a UINT that receives the /// information. Windows 2000/NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETFONTSMOOTHINGCONTRAST = 0x200C, /// /// Sets the contrast value used in ClearType smoothing. The pvParam parameter points to a UINT that holds the contrast value. /// Valid contrast values are from 1000 to 2200. The default value is 1400. When using this option, the fWinIni parameter must be /// set to SPIF_SENDWININICHANGE | SPIF_UPDATEINIFILE; otherwise, SystemParametersInfo fails. SPI_SETFONTSMOOTHINGTYPE must also /// be set to FE_FONTSMOOTHINGCLEARTYPE. Windows 2000/NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set)] SPI_SETFONTSMOOTHINGCONTRAST = 0x200D, /// /// Retrieves the width, in pixels, of the left and right edges of the focus rectangle drawn with DrawFocusRect. The pvParam /// parameter must point to a UINT. Windows 2000/NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETFOCUSBORDERWIDTH = 0x200E, /// /// Sets the height of the left and right edges of the focus rectangle drawn with DrawFocusRect to the value of the pvParam /// parameter. Windows 2000/NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, Direct)] SPI_SETFOCUSBORDERWIDTH = 0x200F, /// /// Retrieves the height, in pixels, of the top and bottom edges of the focus rectangle drawn with DrawFocusRect. The pvParam /// parameter must point to a UINT. Windows 2000/NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETFOCUSBORDERHEIGHT = 0x2010, /// /// Sets the height of the top and bottom edges of the focus rectangle drawn with DrawFocusRect to the value of the pvParam /// parameter. Windows 2000/NT, Windows Me/98/95: This value is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, Direct)] SPI_SETFOCUSBORDERHEIGHT = 0x2011, /// /// Retrieves the font smoothing orientation. The pvParam parameter must point to a UINT that receives the information. The /// possible values are FE_FONTSMOOTHINGORIENTATIONBGR (blue-green-red) and FE_FONTSMOOTHINGORIENTATIONRGB (red-green-blue). /// Windows XP/2000: This parameter is not supported until Windows XP with SP2. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETFONTSMOOTHINGORIENTATION = 0x2012, /// /// Sets the font smoothing orientation. The pvParam parameter is either FE_FONTSMOOTHINGORIENTATIONBGR (blue-green-red) or /// FE_FONTSMOOTHINGORIENTATIONRGB (red-green-blue). Windows XP/2000: This parameter is not supported until Windows XP with SP2. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, Direct)] SPI_SETFONTSMOOTHINGORIENTATION = 0x2013, /// Undocumented SPI_GETMINIMUMHITRADIUS = 0x2014, /// Undocumented SPI_SETMINIMUMHITRADIUS = 0x2015, /// /// Retrieves the time that notification pop-ups should be displayed, in seconds. The pvParam parameter must point to a ULONG /// that receives the message duration. Users with visual impairments or cognitive conditions such as ADHD and dyslexia might /// need a longer time to read the text in notification messages. This flag enables you to retrieve the message duration. Windows /// Server 2003 and Windows XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Get)] SPI_GETMESSAGEDURATION = 0x2016, /// /// Sets the time that notification pop-ups should be displayed, in seconds. The pvParam parameter specifies the message /// duration. Users with visual impairments or cognitive conditions such as ADHD and dyslexia might need a longer time to read /// the text in notification messages. This flag enables you to set the message duration. Windows Server 2003 and Windows /// XP/2000: This parameter is not supported. /// [SPCorrespondingType(typeof(uint), CorrespondingAction.Set, Direct)] SPI_SETMESSAGEDURATION = 0x2017, /// /// Retrieves the current contact visualization setting. The pvParam parameter must point to a ULONG variable that receives the /// setting. For more information, see Contact Visualization. /// [SPCorrespondingType(typeof(ContactVisualization), CorrespondingAction.Get)] SPI_GETCONTACTVISUALIZATION = 0x2018, /// /// Sets the current contact visualization setting. The pvParam parameter must point to a ULONG variable that identifies the /// setting. For more information, see Contact Visualization. /// [SPCorrespondingType(typeof(ContactVisualization), CorrespondingAction.Set)] SPI_SETCONTACTVISUALIZATION = 0x2019, /// /// Retrieves the current gesture visualization setting. The pvParam parameter must point to a ULONG variable that receives the /// setting. For more information, see Gesture Visualization. /// [SPCorrespondingType(typeof(GestureVisualization), CorrespondingAction.Get)] SPI_GETGESTUREVISUALIZATION = 0x201A, /// /// Sets the current gesture visualization setting. The pvParam parameter must point to a ULONG variable that identifies the /// setting. For more information, see Gesture Visualization. /// [SPCorrespondingType(typeof(GestureVisualization), CorrespondingAction.Set)] SPI_SETGESTUREVISUALIZATION = 0x201B, /// /// Retrieves the routing setting for wheel button input. The routing setting determines whether wheel button input is sent to /// the app with focus (foreground) or the app under the mouse cursor. The pvParam parameter must point to a DWORD variable that /// receives the routing option. If the value is zero or MOUSEWHEEL_ROUTING_FOCUS, mouse wheel input is delivered to the app with /// focus. If the value is 1 or MOUSEWHEEL_ROUTING_HYBRID (default), mouse wheel input is delivered to the app with focus(desktop /// apps) or the app under the mouse cursor(Windows Store apps). The uiParam parameter is not used. /// [SPCorrespondingType(typeof(MouseWheelRouting), CorrespondingAction.Get)] SPI_GETMOUSEWHEELROUTING = 0x201C, /// /// Sets the routing setting for wheel button input. The routing setting determines whether wheel button input is sent to the app /// with focus (foreground) or the app under the mouse cursor. The pvParam parameter must point to a DWORD variable that receives /// the routing option. If the value is zero or MOUSEWHEEL_ROUTING_FOCUS, mouse wheel input is delivered to the app with focus. /// If the value is 1 or MOUSEWHEEL_ROUTING_HYBRID (default), mouse wheel input is delivered to the app with focus(desktop apps) /// or the app under the mouse cursor(Windows Store apps). Set the uiParam parameter to zero. /// [SPCorrespondingType(typeof(MouseWheelRouting), CorrespondingAction.Set)] SPI_SETMOUSEWHEELROUTING = 0x201D, /// /// Retrieves the current pen gesture visualization setting. The pvParam parameter must point to a ULONG variable that receives /// the setting. For more information, see Pen Visualization. /// [SPCorrespondingType(typeof(PenVisualization), CorrespondingAction.Get)] SPI_GETPENVISUALIZATION = 0x201E, /// /// Sets the current pen gesture visualization setting. The pvParam parameter must point to a ULONG variable that identifies the /// setting. For more information, see Pen Visualization. /// [SPCorrespondingType(typeof(PenVisualization), CorrespondingAction.Set)] SPI_SETPENVISUALIZATION = 0x201F, /// Undocumented [SPCorrespondingType(typeof(PenArbitrationType), CorrespondingAction.Get)] SPI_GETPENARBITRATIONTYPE = 0x2020, /// Undocumented [SPCorrespondingType(typeof(PenArbitrationType), CorrespondingAction.Set)] SPI_SETPENARBITRATIONTYPE = 0x2021, /// Undocumented SPI_GETCARETTIMEOUT = 0x2022, /// Undocumented SPI_SETCARETTIMEOUT = 0x2023, /// Undocumented [SPCorrespondingType(typeof(HANDEDNESS), CorrespondingAction.Get)] SPI_GETHANDEDNESS = 0x2024, /// Undocumented [SPCorrespondingType(typeof(HANDEDNESS), CorrespondingAction.Set)] SPI_SETHANDEDNESS = 0x2025, } /// Flags for SystemParametersInfo [PInvokeData("Winuser.h")] [Flags] public enum SPIF { /// No flags set. None = 0x00, /// Writes the new system-wide parameter setting to the user profile. SPIF_UPDATEINIFILE = 0x01, /// Broadcasts the WM_SETTINGCHANGE message after updating the user profile. SPIF_SENDCHANGE = 0x02, /// Same as SPIF_SENDCHANGE. SPIF_SENDWININICHANGE = 0x02 } /// A set of bit flags that specify properties of the SoundSentry feature. [PInvokeData("Winuser.h")] [Flags] public enum SSF { /// If this flag is set, the SoundSentry feature is on. SSF_SOUNDSENTRYON = 0x00000001, /// If this flag is set, the SoundSentry feature is available. SSF_AVAILABLE = 0x00000002, /// This flag is not implemented. SSF_INDICATOR = 0x00000004 } /// /// Specifies the visual signal to present when a graphics-mode application generates a sound while running in a full-screen virtual machine. /// [PInvokeData("Winuser.h")] public enum SSGF { /// No visual signal SSGF_NONE = 0, /// Flash the entire display. SSGF_DISPLAY = 3, } /// /// Specifies the visual signal to present when a text-mode application generates a sound while running in a full-screen virtual machine. /// [PInvokeData("Winuser.h")] public enum SSTF { /// No visual signal SSTF_NONE = 0, /// Flash characters in the corner of the screen. SSTF_CHARS = 1, /// Flash the screen border (that is, the overscan area), which is unavailable on some displays. SSTF_BORDER = 2, /// Flash the entire display. SSTF_DISPLAY = 3, } /// /// Specifies the visual signal to display when a sound is generated by a Windows-based application or an MS-DOS application running /// in a window. /// [PInvokeData("Winuser.h")] public enum SSWF { /// No visual signal. SSWF_NONE = 0, /// Flash the title bar of the active window. SSWF_TITLE = 1, /// Flash the active window. SSWF_WINDOW = 2, /// Flash the entire display. SSWF_DISPLAY = 3, /// Use a custom visual signal. SSWF_CUSTOM = 4, } /// The system metric or configuration setting to be retrieved by . [PInvokeData("Winuser.h", MSDNShortId = "ms724385")] public enum SystemMetric { /// /// The flags that specify how the system arranged minimized windows. For more information, see the Remarks section in this topic. /// SM_ARRANGE = 56, /// /// The value that specifies how the system is started: /// 0 Normal boot /// 1 Fail-safe boot /// 2 Fail-safe with network boot /// A fail-safe boot (also called SafeBoot, Safe Mode, or Clean Boot) bypasses the user startup files. /// SM_CLEANBOOT = 67, /// The number of display monitors on a desktop. For more information, see the Remarks section in this topic. SM_CMONITORS = 80, /// The number of buttons on a mouse, or zero if no mouse is installed. SM_CMOUSEBUTTONS = 43, /// /// Reflects the state of the laptop or slate mode, 0 for Slate Mode and non-zero otherwise. When this system metric changes, the /// system sends a broadcast message via WM_SETTINGCHANGE with "ConvertibleSlateMode" in the LPARAM. Note that this system metric /// doesn't apply to desktop PCs. In that case, use GetAutoRotationState. /// SM_CONVERTIBLESLATEMODE = 0x2003, /// /// The width of a window border, in pixels. This is equivalent to the SM_CXEDGE value for windows with the 3-D look. /// SM_CXBORDER = 5, /// The width of a cursor, in pixels. The system cannot create cursors of other sizes. SM_CXCURSOR = 13, /// This value is the same as SM_CXFIXEDFRAME. SM_CXDLGFRAME = 7, /// /// The width of the rectangle around the location of a first click in a double-click sequence, in pixels. The second click must /// occur within the rectangle that is defined by SM_CXDOUBLECLK and SM_CYDOUBLECLK for the system to consider the two clicks a /// double-click. The two clicks must also occur within a specified time. /// To set the width of the double-click rectangle, call SystemParametersInfo with SPI_SETDOUBLECLKWIDTH. /// SM_CXDOUBLECLK = 36, /// /// The number of pixels on either side of a mouse-down point that the mouse pointer can move before a drag operation begins. /// This allows the user to click and release the mouse button easily without unintentionally starting a drag operation. If this /// value is negative, it is subtracted from the left of the mouse-down point and added to the right of it. /// SM_CXDRAG = 68, /// The width of a 3-D border, in pixels. This metric is the 3-D counterpart of SM_CXBORDER. SM_CXEDGE = 45, /// /// The thickness of the frame around the perimeter of a window that has a caption but is not sizable, in pixels. SM_CXFIXEDFRAME /// is the height of the horizontal border, and SM_CYFIXEDFRAME is the width of the vertical border. /// This value is the same as SM_CXDLGFRAME. /// SM_CXFIXEDFRAME = 7, /// /// The width of the left and right edges of the focus rectangle that the DrawFocusRect draws. This value is in pixels. /// Windows 2000: This value is not supported. /// SM_CXFOCUSBORDER = 83, /// This value is the same as SM_CXSIZEFRAME. SM_CXFRAME = 32, /// /// The width of the client area for a full-screen window on the primary display monitor, in pixels. To get the coordinates of /// the portion of the screen that is not obscured by the system taskbar or by application desktop toolbars, call the /// SystemParametersInfo function with the SPI_GETWORKAREA value. /// SM_CXFULLSCREEN = 16, /// The width of the arrow bitmap on a horizontal scroll bar, in pixels. SM_CXHSCROLL = 21, /// The width of the thumb box in a horizontal scroll bar, in pixels. SM_CXHTHUMB = 10, /// /// The default width of an icon, in pixels. The LoadIcon function can load only icons with the dimensions that SM_CXICON and /// SM_CYICON specifies. /// SM_CXICON = 11, /// /// The width of a grid cell for items in large icon view, in pixels. Each item fits into a rectangle of size SM_CXICONSPACING by /// SM_CYICONSPACING when arranged. This value is always greater than or equal to SM_CXICON. /// SM_CXICONSPACING = 38, /// The default width, in pixels, of a maximized top-level window on the primary display monitor. SM_CXMAXIMIZED = 61, /// /// The default maximum width of a window that has a caption and sizing borders, in pixels. This metric refers to the entire /// desktop. The user cannot drag the window frame to a size larger than these dimensions. A window can override this value by /// processing the WM_GETMINMAXINFO message. /// SM_CXMAXTRACK = 59, /// The width of the default menu check-mark bitmap, in pixels. SM_CXMENUCHECK = 71, /// /// The width of menu bar buttons, such as the child window close button that is used in the multiple document interface, in pixels. /// SM_CXMENUSIZE = 54, /// The minimum width of a window, in pixels. SM_CXMIN = 28, /// The width of a minimized window, in pixels. SM_CXMINIMIZED = 57, /// /// The width of a grid cell for a minimized window, in pixels. Each minimized window fits into a rectangle this size when /// arranged. This value is always greater than or equal to SM_CXMINIMIZED. /// SM_CXMINSPACING = 47, /// /// The minimum tracking width of a window, in pixels. The user cannot drag the window frame to a size smaller than these /// dimensions. A window can override this value by processing the WM_GETMINMAXINFO message. /// SM_CXMINTRACK = 34, /// /// The amount of border padding for captioned windows, in pixels. /// Windows XP/2000: This value is not supported. /// SM_CXPADDEDBORDER = 92, /// /// The width of the screen of the primary display monitor, in pixels. This is the same value obtained by calling GetDeviceCaps /// as follows: GetDeviceCaps( hdcPrimaryMonitor, HORZRES). /// SM_CXSCREEN = 0, /// The width of a button in a window caption or title bar, in pixels. SM_CXSIZE = 30, /// /// The thickness of the sizing border around the perimeter of a window that can be resized, in pixels. SM_CXSIZEFRAME is the /// width of the horizontal border, and SM_CYSIZEFRAME is the height of the vertical border. /// This value is the same as SM_CXFRAME. /// SM_CXSIZEFRAME = 32, /// /// The recommended width of a small icon, in pixels. Small icons typically appear in window captions and in small icon view. /// SM_CXSMICON = 49, /// The width of small caption buttons, in pixels. SM_CXSMSIZE = 52, /// /// The width of the virtual screen, in pixels. The virtual screen is the bounding rectangle of all display monitors. The /// SM_XVIRTUALSCREEN metric is the coordinates for the left side of the virtual screen. /// SM_CXVIRTUALSCREEN = 78, /// The width of a vertical scroll bar, in pixels. SM_CXVSCROLL = 2, /// /// The height of a window border, in pixels. This is equivalent to the SM_CYEDGE value for windows with the 3-D look. /// SM_CYBORDER = 6, /// The height of a caption area, in pixels. SM_CYCAPTION = 4, /// The height of a cursor, in pixels. The system cannot create cursors of other sizes. SM_CYCURSOR = 14, /// This value is the same as SM_CYFIXEDFRAME. SM_CYDLGFRAME = 8, /// /// The height of the rectangle around the location of a first click in a double-click sequence, in pixels. The second click must /// occur within the rectangle defined by SM_CXDOUBLECLK and SM_CYDOUBLECLK for the system to consider the two clicks a /// double-click. The two clicks must also occur within a specified time. /// To set the height of the double-click rectangle, call SystemParametersInfo with SPI_SETDOUBLECLKHEIGHT. /// SM_CYDOUBLECLK = 37, /// /// The number of pixels above and below a mouse-down point that the mouse pointer can move before a drag operation begins. This /// allows the user to click and release the mouse button easily without unintentionally starting a drag operation. If this value /// is negative, it is subtracted from above the mouse-down point and added below it. /// SM_CYDRAG = 69, /// The height of a 3-D border, in pixels. This is the 3-D counterpart of SM_CYBORDER. SM_CYEDGE = 46, /// /// The thickness of the frame around the perimeter of a window that has a caption but is not sizable, in pixels. SM_CXFIXEDFRAME /// is the height of the horizontal border, and SM_CYFIXEDFRAME is the width of the vertical border. /// This value is the same as SM_CYDLGFRAME. /// SM_CYFIXEDFRAME = 8, /// /// The height of the top and bottom edges of the focus rectangle drawn by DrawFocusRect. This value is in pixels. /// Windows 2000: This value is not supported. /// SM_CYFOCUSBORDER = 84, /// This value is the same as SM_CYSIZEFRAME. SM_CYFRAME = 33, /// /// The height of the client area for a full-screen window on the primary display monitor, in pixels. To get the coordinates of /// the portion of the screen not obscured by the system taskbar or by application desktop toolbars, call the /// SystemParametersInfo function with the SPI_GETWORKAREA value. /// SM_CYFULLSCREEN = 17, /// The height of a horizontal scroll bar, in pixels. SM_CYHSCROLL = 3, /// /// The default height of an icon, in pixels. The LoadIcon function can load only icons with the dimensions SM_CXICON and SM_CYICON. /// SM_CYICON = 12, /// /// The height of a grid cell for items in large icon view, in pixels. Each item fits into a rectangle of size SM_CXICONSPACING /// by SM_CYICONSPACING when arranged. This value is always greater than or equal to SM_CYICON. /// SM_CYICONSPACING = 39, /// /// For double byte character set versions of the system, this is the height of the Kanji window at the bottom of the screen, in pixels. /// SM_CYKANJIWINDOW = 18, /// The default height, in pixels, of a maximized top-level window on the primary display monitor. SM_CYMAXIMIZED = 62, /// /// The default maximum height of a window that has a caption and sizing borders, in pixels. This metric refers to the entire /// desktop. The user cannot drag the window frame to a size larger than these dimensions. A window can override this value by /// processing the WM_GETMINMAXINFO message. /// SM_CYMAXTRACK = 60, /// The height of a single-line menu bar, in pixels. SM_CYMENU = 15, /// The height of the default menu check-mark bitmap, in pixels. SM_CYMENUCHECK = 72, /// /// The height of menu bar buttons, such as the child window close button that is used in the multiple document interface, in pixels. /// SM_CYMENUSIZE = 55, /// The minimum height of a window, in pixels. SM_CYMIN = 29, /// The height of a minimized window, in pixels. SM_CYMINIMIZED = 58, /// /// The height of a grid cell for a minimized window, in pixels. Each minimized window fits into a rectangle this size when /// arranged. This value is always greater than or equal to SM_CYMINIMIZED. /// SM_CYMINSPACING = 48, /// /// The minimum tracking height of a window, in pixels. The user cannot drag the window frame to a size smaller than these /// dimensions. A window can override this value by processing the WM_GETMINMAXINFO message. /// SM_CYMINTRACK = 35, /// /// The height of the screen of the primary display monitor, in pixels. This is the same value obtained by calling GetDeviceCaps /// as follows: GetDeviceCaps( hdcPrimaryMonitor, VERTRES). /// SM_CYSCREEN = 1, /// The height of a button in a window caption or title bar, in pixels. SM_CYSIZE = 31, /// /// The thickness of the sizing border around the perimeter of a window that can be resized, in pixels. SM_CXSIZEFRAME is the /// width of the horizontal border, and SM_CYSIZEFRAME is the height of the vertical border. /// This value is the same as SM_CYFRAME. /// SM_CYSIZEFRAME = 33, /// The height of a small caption, in pixels. SM_CYSMCAPTION = 51, /// /// The recommended height of a small icon, in pixels. Small icons typically appear in window captions and in small icon view. /// SM_CYSMICON = 50, /// The height of small caption buttons, in pixels. SM_CYSMSIZE = 53, /// /// The height of the virtual screen, in pixels. The virtual screen is the bounding rectangle of all display monitors. The /// SM_YVIRTUALSCREEN metric is the coordinates for the top of the virtual screen. /// SM_CYVIRTUALSCREEN = 79, /// The height of the arrow bitmap on a vertical scroll bar, in pixels. SM_CYVSCROLL = 20, /// The height of the thumb box in a vertical scroll bar, in pixels. SM_CYVTHUMB = 9, /// Nonzero if User32.dll supports DBCS; otherwise, 0. SM_DBCSENABLED = 42, /// Nonzero if the debug version of User.exe is installed; otherwise, 0. SM_DEBUG = 22, /// /// Nonzero if the current operating system is Windows 7 or Windows Server 2008 R2 and the Tablet PC Input service is started; /// otherwise, 0. The return value is a bitmask that specifies the type of digitizer input supported by the device. For more /// information, see Remarks. /// Windows Server 2008, Windows Vista and Windows XP/2000: This value is not supported. /// SM_DIGITIZER = 94, /// /// Nonzero if Input Method Manager/Input Method Editor features are enabled; otherwise, 0. /// /// SM_IMMENABLED indicates whether the system is ready to use a Unicode-based IME on a Unicode application. To ensure that a /// language-dependent IME works, check SM_DBCSENABLED and the system ANSI code page. Otherwise the ANSI-to-Unicode conversion /// may not be performed correctly, or some components like fonts or registry settings may not be present. /// /// SM_IMMENABLED = 82, /// /// Nonzero if there are digitizers in the system; otherwise, 0. /// /// SM_MAXIMUMTOUCHES returns the aggregate maximum of the maximum number of contacts supported by every digitizer in the system. /// If the system has only single-touch digitizers, the return value is 1. If the system has multi-touch digitizers, the return /// value is the number of simultaneous contacts the hardware can provide. /// /// Windows Server 2008, Windows Vista and Windows XP/2000: This value is not supported. /// SM_MAXIMUMTOUCHES = 95, /// Nonzero if the current operating system is the Windows XP, Media Center Edition, 0 if not. SM_MEDIACENTER = 87, /// Nonzero if drop-down menus are right-aligned with the corresponding menu-bar item; 0 if the menus are left-aligned. SM_MENUDROPALIGNMENT = 40, /// Nonzero if the system is enabled for Hebrew and Arabic languages, 0 if not. SM_MIDEASTENABLED = 74, /// /// Nonzero if a mouse is installed; otherwise, 0. This value is rarely zero, because of support for virtual mice and because /// some systems detect the presence of the port instead of the presence of a mouse. /// SM_MOUSEPRESENT = 19, /// Nonzero if a mouse with a horizontal scroll wheel is installed; otherwise 0. SM_MOUSEHORIZONTALWHEELPRESENT = 91, /// Nonzero if a mouse with a vertical scroll wheel is installed; otherwise 0. SM_MOUSEWHEELPRESENT = 75, /// /// The least significant bit is set if a network is present; otherwise, it is cleared. The other bits are reserved for future use. /// SM_NETWORK = 63, /// Nonzero if the Microsoft Windows for Pen computing extensions are installed; zero otherwise. SM_PENWINDOWS = 41, /// /// This system metric is used in a Terminal Services environment to determine if the current Terminal Server session is being /// remotely controlled. Its value is nonzero if the current session is remotely controlled; otherwise, 0. /// /// You can use terminal services management tools such as Terminal Services Manager (tsadmin.msc) and shadow.exe to control a /// remote session. When a session is being remotely controlled, another user can view the contents of that session and /// potentially interact with it. /// /// SM_REMOTECONTROL = 0x2001, /// /// This system metric is used in a Terminal Services environment. If the calling process is associated with a Terminal Services /// client session, the return value is nonzero. If the calling process is associated with the Terminal Services console session, /// the return value is 0. /// /// Windows Server 2003 and Windows XP: The console session is not necessarily the physical console. For more information, see WTSGetActiveConsoleSessionId. /// /// SM_REMOTESESSION = 0x1000, /// /// Nonzero if all the display monitors have the same color format, otherwise, 0. Two displays can have the same bit depth, but /// different color formats. For example, the red, green, and blue pixels can be encoded with different numbers of bits, or those /// bits can be located in different places in a pixel color value. /// SM_SAMEDISPLAYFORMAT = 81, /// This system metric should be ignored; it always returns 0. SM_SECURE = 44, /// The build number if the system is Windows Server 2003 R2; otherwise, 0. SM_SERVERR2 = 89, /// /// Nonzero if the user requires an application to present information visually in situations where it would otherwise present /// the information only in audible form; otherwise, 0. /// SM_SHOWSOUNDS = 70, /// /// Nonzero if the current session is shutting down; otherwise, 0. /// Windows 2000: This value is not supported. /// SM_SHUTTINGDOWN = 0x2000, /// Nonzero if the computer has a low-end (slow) processor; otherwise, 0. SM_SLOWMACHINE = 73, /// /// Nonzero if the current operating system is Windows 7 Starter Edition, Windows Vista Starter, or Windows XP Starter Edition; /// otherwise, 0. /// SM_STARTER = 88, /// Nonzero if the meanings of the left and right mouse buttons are swapped; otherwise, 0. SM_SWAPBUTTON = 23, /// /// Reflects the state of the docking mode, 0 for Undocked Mode and non-zero otherwise. When this system metric changes, the /// system sends a broadcast message via WM_SETTINGCHANGE with "SystemDockMode" in the LPARAM. /// SM_SYSTEMDOCKED = 0x2004, /// /// Nonzero if the current operating system is the Windows XP Tablet PC edition or if the current operating system is Windows /// Vista or Windows 7 and the Tablet PC Input service is started; otherwise, 0. The SM_DIGITIZER setting indicates the type of /// digitizer input supported by a device running Windows 7 or Windows Server 2008 R2. For more information, see Remarks. /// SM_TABLETPC = 86, /// /// The coordinates for the left side of the virtual screen. The virtual screen is the bounding rectangle of all display /// monitors. The SM_CXVIRTUALSCREEN metric is the width of the virtual screen. /// SM_XVIRTUALSCREEN = 76, /// /// The coordinates for the top of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. The /// SM_CYVIRTUALSCREEN metric is the height of the virtual screen. /// SM_YVIRTUALSCREEN = 77, } /// A set of bit flags that specify properties of the ToggleKeys feature. [PInvokeData("Winuser.h")] [Flags] public enum TKF : uint { /// If this flag is set, the ToggleKeys feature is available. TKF_AVAILABLE = 0x00000002, /// /// Windows 95/98, Windows 2000: A confirmation dialog box appears when the ToggleKeys feature is activated by using the hot key. /// TKF_CONFIRMHOTKEY = 0x00000008, /// /// If this flag is set, the user can turn the ToggleKeys feature on and off by holding down the NUM LOCK key for eight seconds. /// TKF_HOTKEYACTIVE = 0x00000004, /// /// If this flag is set, the system plays a siren sound when the user turns the ToggleKeys feature on or off by using the hot key. /// TKF_HOTKEYSOUND = 0x00000010, /// This flag is not implemented. TKF_INDICATOR = 0x00000020, /// If this flag is set, the ToggleKeys feature is on. TKF_TOGGLEKEYSON = 0x00000001, } /// /// The ExitWindowsEx function either logs off the current 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. /// /// Specifies the type of shutdown. /// The reason for initiating the shutdown. /// /// If the function succeeds, the return value is nonzero.


If the function fails, the return value is zero. To get /// extended error information, call Marshal.GetLastWin32Error.
///
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa376868(v=vs.85).aspx [DllImport(Lib.User32, ExactSpelling = true, SetLastError = true)] [PInvokeData("Winuser.h", MSDNShortId = "aa376868")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool ExitWindowsEx(ExitWindowsFlags uFlags, SystemShutDownReason dwReason); /// /// Retrieves the specified system metric or system configuration setting. /// Note that all dimensions retrieved by GetSystemMetrics are in pixels. /// /// /// Type: int /// /// The system metric or configuration setting to be retrieved. This parameter can be one of the following values. Note that all /// SM_CX* values are widths and all SM_CY* values are heights. Also note that all settings designed to return Boolean data represent /// TRUE as any nonzero value, and FALSE as a zero value. /// /// /// /// /// Value /// Meaning /// /// /// SM_ARRANGE56 /// /// The flags that specify how the system arranged minimized windows. For more information, see the Remarks section in this topic. /// /// /// /// SM_CLEANBOOT67 /// /// The value that specifies how the system is started: A fail-safe boot (also called SafeBoot, Safe Mode, or Clean Boot) bypasses /// the user startup files. /// /// /// /// SM_CMONITORS80 /// The number of display monitors on a desktop. For more information, see the Remarks section in this topic. /// /// /// SM_CMOUSEBUTTONS43 /// The number of buttons on a mouse, or zero if no mouse is installed. /// /// /// SM_CONVERTIBLESLATEMODE0x2003 /// /// Reflects the state of the laptop or slate mode, 0 for Slate Mode and non-zero otherwise. When this system metric changes, the /// system sends a broadcast message via WM_SETTINGCHANGE with "ConvertibleSlateMode" in the LPARAM. Note that this /// system metric doesn't apply to desktop PCs. In that case, use GetAutoRotationState. /// /// /// /// SM_CXBORDER5 /// The width of a window border, in pixels. This is equivalent to the SM_CXEDGE value for windows with the 3-D look. /// /// /// SM_CXCURSOR13 /// The width of a cursor, in pixels. The system cannot create cursors of other sizes. /// /// /// SM_CXDLGFRAME7 /// This value is the same as SM_CXFIXEDFRAME. /// /// /// SM_CXDOUBLECLK36 /// /// The width of the rectangle around the location of a first click in a double-click sequence, in pixels. The second click must /// occur within the rectangle that is defined by SM_CXDOUBLECLK and SM_CYDOUBLECLK for the system to consider the two clicks a /// double-click. The two clicks must also occur within a specified time. To set the width of the double-click rectangle, call /// SystemParametersInfo with SPI_SETDOUBLECLKWIDTH. /// /// /// /// SM_CXDRAG68 /// /// The number of pixels on either side of a mouse-down point that the mouse pointer can move before a drag operation begins. This /// allows the user to click and release the mouse button easily without unintentionally starting a drag operation. If this value is /// negative, it is subtracted from the left of the mouse-down point and added to the right of it. /// /// /// /// SM_CXEDGE45 /// The width of a 3-D border, in pixels. This metric is the 3-D counterpart of SM_CXBORDER. /// /// /// SM_CXFIXEDFRAME7 /// /// The thickness of the frame around the perimeter of a window that has a caption but is not sizable, in pixels. SM_CXFIXEDFRAME is /// the height of the horizontal border, and SM_CYFIXEDFRAME is the width of the vertical border. This value is the same as SM_CXDLGFRAME. /// /// /// /// SM_CXFOCUSBORDER83 /// /// The width of the left and right edges of the focus rectangle that the DrawFocusRect draws. This value is in pixels. Windows 2000: /// This value is not supported. /// /// /// /// SM_CXFRAME32 /// This value is the same as SM_CXSIZEFRAME. /// /// /// SM_CXFULLSCREEN16 /// /// The width of the client area for a full-screen window on the primary display monitor, in pixels. To get the coordinates of the /// portion of the screen that is not obscured by the system taskbar or by application desktop toolbars, call the /// SystemParametersInfo function with the SPI_GETWORKAREA value. /// /// /// /// SM_CXHSCROLL21 /// The width of the arrow bitmap on a horizontal scroll bar, in pixels. /// /// /// SM_CXHTHUMB10 /// The width of the thumb box in a horizontal scroll bar, in pixels. /// /// /// SM_CXICON11 /// /// The default width of an icon, in pixels. The LoadIcon function can load only icons with the dimensions that SM_CXICON and /// SM_CYICON specifies. /// /// /// /// SM_CXICONSPACING38 /// /// The width of a grid cell for items in large icon view, in pixels. Each item fits into a rectangle of size SM_CXICONSPACING by /// SM_CYICONSPACING when arranged. This value is always greater than or equal to SM_CXICON. /// /// /// /// SM_CXMAXIMIZED61 /// The default width, in pixels, of a maximized top-level window on the primary display monitor. /// /// /// SM_CXMAXTRACK59 /// /// The default maximum width of a window that has a caption and sizing borders, in pixels. This metric refers to the entire desktop. /// The user cannot drag the window frame to a size larger than these dimensions. A window can override this value by processing the /// WM_GETMINMAXINFO message. /// /// /// /// SM_CXMENUCHECK71 /// The width of the default menu check-mark bitmap, in pixels. /// /// /// SM_CXMENUSIZE54 /// /// The width of menu bar buttons, such as the child window close button that is used in the multiple document interface, in pixels. /// /// /// /// SM_CXMIN28 /// The minimum width of a window, in pixels. /// /// /// SM_CXMINIMIZED57 /// The width of a minimized window, in pixels. /// /// /// SM_CXMINSPACING47 /// /// The width of a grid cell for a minimized window, in pixels. Each minimized window fits into a rectangle this size when arranged. /// This value is always greater than or equal to SM_CXMINIMIZED. /// /// /// /// SM_CXMINTRACK34 /// /// The minimum tracking width of a window, in pixels. The user cannot drag the window frame to a size smaller than these dimensions. /// A window can override this value by processing the WM_GETMINMAXINFO message. /// /// /// /// SM_CXPADDEDBORDER92 /// The amount of border padding for captioned windows, in pixels.Windows XP/2000: This value is not supported. /// /// /// SM_CXSCREEN0 /// /// The width of the screen of the primary display monitor, in pixels. This is the same value obtained by calling GetDeviceCaps as /// follows: . /// /// /// /// SM_CXSIZE30 /// The width of a button in a window caption or title bar, in pixels. /// /// /// SM_CXSIZEFRAME32 /// /// The thickness of the sizing border around the perimeter of a window that can be resized, in pixels. SM_CXSIZEFRAME is the width /// of the horizontal border, and SM_CYSIZEFRAME is the height of the vertical border. This value is the same as SM_CXFRAME. /// /// /// /// SM_CXSMICON49 /// The recommended width of a small icon, in pixels. Small icons typically appear in window captions and in small icon view. /// /// /// SM_CXSMSIZE52 /// The width of small caption buttons, in pixels. /// /// /// SM_CXVIRTUALSCREEN78 /// /// The width of the virtual screen, in pixels. The virtual screen is the bounding rectangle of all display monitors. The /// SM_XVIRTUALSCREEN metric is the coordinates for the left side of the virtual screen. /// /// /// /// SM_CXVSCROLL2 /// The width of a vertical scroll bar, in pixels. /// /// /// SM_CYBORDER6 /// The height of a window border, in pixels. This is equivalent to the SM_CYEDGE value for windows with the 3-D look. /// /// /// SM_CYCAPTION4 /// The height of a caption area, in pixels. /// /// /// SM_CYCURSOR14 /// The height of a cursor, in pixels. The system cannot create cursors of other sizes. /// /// /// SM_CYDLGFRAME8 /// This value is the same as SM_CYFIXEDFRAME. /// /// /// SM_CYDOUBLECLK37 /// /// The height of the rectangle around the location of a first click in a double-click sequence, in pixels. The second click must /// occur within the rectangle defined by SM_CXDOUBLECLK and SM_CYDOUBLECLK for the system to consider the two clicks a double-click. /// The two clicks must also occur within a specified time. To set the height of the double-click rectangle, call /// SystemParametersInfo with SPI_SETDOUBLECLKHEIGHT. /// /// /// /// SM_CYDRAG69 /// /// The number of pixels above and below a mouse-down point that the mouse pointer can move before a drag operation begins. This /// allows the user to click and release the mouse button easily without unintentionally starting a drag operation. If this value is /// negative, it is subtracted from above the mouse-down point and added below it. /// /// /// /// SM_CYEDGE46 /// The height of a 3-D border, in pixels. This is the 3-D counterpart of SM_CYBORDER. /// /// /// SM_CYFIXEDFRAME8 /// /// The thickness of the frame around the perimeter of a window that has a caption but is not sizable, in pixels. SM_CXFIXEDFRAME is /// the height of the horizontal border, and SM_CYFIXEDFRAME is the width of the vertical border.This value is the same as SM_CYDLGFRAME. /// /// /// /// SM_CYFOCUSBORDER84 /// /// The height of the top and bottom edges of the focus rectangle drawn by DrawFocusRect. This value is in pixels.Windows 2000: This /// value is not supported. /// /// /// /// SM_CYFRAME33 /// This value is the same as SM_CYSIZEFRAME. /// /// /// SM_CYFULLSCREEN17 /// /// The height of the client area for a full-screen window on the primary display monitor, in pixels. To get the coordinates of the /// portion of the screen not obscured by the system taskbar or by application desktop toolbars, call the SystemParametersInfo /// function with the SPI_GETWORKAREA value. /// /// /// /// SM_CYHSCROLL3 /// The height of a horizontal scroll bar, in pixels. /// /// /// SM_CYICON12 /// /// The default height of an icon, in pixels. The LoadIcon function can load only icons with the dimensions SM_CXICON and SM_CYICON. /// /// /// /// SM_CYICONSPACING39 /// /// The height of a grid cell for items in large icon view, in pixels. Each item fits into a rectangle of size SM_CXICONSPACING by /// SM_CYICONSPACING when arranged. This value is always greater than or equal to SM_CYICON. /// /// /// /// SM_CYKANJIWINDOW18 /// /// For double byte character set versions of the system, this is the height of the Kanji window at the bottom of the screen, in pixels. /// /// /// /// SM_CYMAXIMIZED62 /// The default height, in pixels, of a maximized top-level window on the primary display monitor. /// /// /// SM_CYMAXTRACK60 /// /// The default maximum height of a window that has a caption and sizing borders, in pixels. This metric refers to the entire /// desktop. The user cannot drag the window frame to a size larger than these dimensions. A window can override this value by /// processing the WM_GETMINMAXINFO message. /// /// /// /// SM_CYMENU15 /// The height of a single-line menu bar, in pixels. /// /// /// SM_CYMENUCHECK72 /// The height of the default menu check-mark bitmap, in pixels. /// /// /// SM_CYMENUSIZE55 /// /// The height of menu bar buttons, such as the child window close button that is used in the multiple document interface, in pixels. /// /// /// /// SM_CYMIN29 /// The minimum height of a window, in pixels. /// /// /// SM_CYMINIMIZED58 /// The height of a minimized window, in pixels. /// /// /// SM_CYMINSPACING48 /// /// The height of a grid cell for a minimized window, in pixels. Each minimized window fits into a rectangle this size when arranged. /// This value is always greater than or equal to SM_CYMINIMIZED. /// /// /// /// SM_CYMINTRACK35 /// /// The minimum tracking height of a window, in pixels. The user cannot drag the window frame to a size smaller than these /// dimensions. A window can override this value by processing the WM_GETMINMAXINFO message. /// /// /// /// SM_CYSCREEN1 /// /// The height of the screen of the primary display monitor, in pixels. This is the same value obtained by calling GetDeviceCaps as /// follows: . /// /// /// /// SM_CYSIZE31 /// The height of a button in a window caption or title bar, in pixels. /// /// /// SM_CYSIZEFRAME33 /// /// The thickness of the sizing border around the perimeter of a window that can be resized, in pixels. SM_CXSIZEFRAME is the width /// of the horizontal border, and SM_CYSIZEFRAME is the height of the vertical border. This value is the same as SM_CYFRAME. /// /// /// /// SM_CYSMCAPTION51 /// The height of a small caption, in pixels. /// /// /// SM_CYSMICON50 /// The recommended height of a small icon, in pixels. Small icons typically appear in window captions and in small icon view. /// /// /// SM_CYSMSIZE53 /// The height of small caption buttons, in pixels. /// /// /// SM_CYVIRTUALSCREEN79 /// /// The height of the virtual screen, in pixels. The virtual screen is the bounding rectangle of all display monitors. The /// SM_YVIRTUALSCREEN metric is the coordinates for the top of the virtual screen. /// /// /// /// SM_CYVSCROLL20 /// The height of the arrow bitmap on a vertical scroll bar, in pixels. /// /// /// SM_CYVTHUMB9 /// The height of the thumb box in a vertical scroll bar, in pixels. /// /// /// SM_DBCSENABLED42 /// Nonzero if User32.dll supports DBCS; otherwise, 0. /// /// /// SM_DEBUG22 /// Nonzero if the debug version of User.exe is installed; otherwise, 0. /// /// /// SM_DIGITIZER94 /// /// Nonzero if the current operating system is Windows 7 or Windows Server 2008 R2 and the Tablet PC Input service is started; /// otherwise, 0. The return value is a bitmask that specifies the type of digitizer input supported by the device. For more /// information, see Remarks.Windows Server 2008, Windows Vista and Windows XP/2000: This value is not supported. /// /// /// /// SM_IMMENABLED82 /// /// Nonzero if Input Method Manager/Input Method Editor features are enabled; otherwise, 0. SM_IMMENABLED indicates whether the /// system is ready to use a Unicode-based IME on a Unicode application. To ensure that a language-dependent IME works, check /// SM_DBCSENABLED and the system ANSI code page. Otherwise the ANSI-to-Unicode conversion may not be performed correctly, or some /// components like fonts or registry settings may not be present. /// /// /// /// SM_MAXIMUMTOUCHES95 /// /// Nonzero if there are digitizers in the system; otherwise, 0. SM_MAXIMUMTOUCHES returns the aggregate maximum of the maximum /// number of contacts supported by every digitizer in the system. If the system has only single-touch digitizers, the return value /// is 1. If the system has multi-touch digitizers, the return value is the number of simultaneous contacts the hardware can /// provide.Windows Server 2008, Windows Vista and Windows XP/2000: This value is not supported. /// /// /// /// SM_MEDIACENTER87 /// Nonzero if the current operating system is the Windows XP, Media Center Edition, 0 if not. /// /// /// SM_MENUDROPALIGNMENT40 /// Nonzero if drop-down menus are right-aligned with the corresponding menu-bar item; 0 if the menus are left-aligned. /// /// /// SM_MIDEASTENABLED74 /// Nonzero if the system is enabled for Hebrew and Arabic languages, 0 if not. /// /// /// SM_MOUSEPRESENT19 /// /// Nonzero if a mouse is installed; otherwise, 0. This value is rarely zero, because of support for virtual mice and because some /// systems detect the presence of the port instead of the presence of a mouse. /// /// /// /// SM_MOUSEHORIZONTALWHEELPRESENT91 /// Nonzero if a mouse with a horizontal scroll wheel is installed; otherwise 0. /// /// /// SM_MOUSEWHEELPRESENT75 /// Nonzero if a mouse with a vertical scroll wheel is installed; otherwise 0. /// /// /// SM_NETWORK63 /// /// The least significant bit is set if a network is present; otherwise, it is cleared. The other bits are reserved for future use. /// /// /// /// SM_PENWINDOWS41 /// Nonzero if the Microsoft Windows for Pen computing extensions are installed; zero otherwise. /// /// /// SM_REMOTECONTROL0x2001 /// /// This system metric is used in a Terminal Services environment to determine if the current Terminal Server session is being /// remotely controlled. Its value is nonzero if the current session is remotely controlled; otherwise, 0.You can use terminal /// services management tools such as Terminal Services Manager (tsadmin.msc) and shadow.exe to control a remote session. When a /// session is being remotely controlled, another user can view the contents of that session and potentially interact with it. /// /// /// /// SM_REMOTESESSION0x1000 /// /// This system metric is used in a Terminal Services environment. If the calling process is associated with a Terminal Services /// client session, the return value is nonzero. If the calling process is associated with the Terminal Services console session, the /// return value is 0. Windows Server 2003 and Windows XP: The console session is not necessarily the physical console. For more /// information, see WTSGetActiveConsoleSessionId. /// /// /// /// SM_SAMEDISPLAYFORMAT81 /// /// Nonzero if all the display monitors have the same color format, otherwise, 0. Two displays can have the same bit depth, but /// different color formats. For example, the red, green, and blue pixels can be encoded with different numbers of bits, or those /// bits can be located in different places in a pixel color value. /// /// /// /// SM_SECURE44 /// This system metric should be ignored; it always returns 0. /// /// /// SM_SERVERR289 /// The build number if the system is Windows Server 2003 R2; otherwise, 0. /// /// /// SM_SHOWSOUNDS70 /// /// Nonzero if the user requires an application to present information visually in situations where it would otherwise present the /// information only in audible form; otherwise, 0. /// /// /// /// SM_SHUTTINGDOWN0x2000 /// Nonzero if the current session is shutting down; otherwise, 0. Windows 2000: This value is not supported. /// /// /// SM_SLOWMACHINE73 /// Nonzero if the computer has a low-end (slow) processor; otherwise, 0. /// /// /// SM_STARTER88 /// /// Nonzero if the current operating system is Windows 7 Starter Edition, Windows Vista Starter, or Windows XP Starter Edition; /// otherwise, 0. /// /// /// /// SM_SWAPBUTTON23 /// Nonzero if the meanings of the left and right mouse buttons are swapped; otherwise, 0. /// /// /// SM_SYSTEMDOCKED0x2004 /// /// Reflects the state of the docking mode, 0 for Undocked Mode and non-zero otherwise. When this system metric changes, the system /// sends a broadcast message via WM_SETTINGCHANGE with "SystemDockMode" in the LPARAM. /// /// /// /// SM_TABLETPC86 /// /// Nonzero if the current operating system is the Windows XP Tablet PC edition or if the current operating system is Windows Vista /// or Windows 7 and the Tablet PC Input service is started; otherwise, 0. The SM_DIGITIZER setting indicates the type of digitizer /// input supported by a device running Windows 7 or Windows Server 2008 R2. For more information, see Remarks. /// /// /// /// SM_XVIRTUALSCREEN76 /// /// The coordinates for the left side of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. /// The SM_CXVIRTUALSCREEN metric is the width of the virtual screen. /// /// /// /// SM_YVIRTUALSCREEN77 /// /// The coordinates for the top of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. The /// SM_CYVIRTUALSCREEN metric is the height of the virtual screen. /// /// /// /// /// /// /// Type: /// If the function succeeds, the return value is the requested system metric or configuration setting. /// If the function fails, the return value is 0. GetLastError does not provide extended error information. /// // int WINAPI GetSystemMetrics( _In_ int nIndex); https://msdn.microsoft.com/en-us/library/windows/desktop/ms724385(v=vs.85).aspx [DllImport(Lib.User32, SetLastError = true, ExactSpelling = true)] [PInvokeData("Winuser.h", MSDNShortId = "ms724385")] public static extern int GetSystemMetrics(SystemMetric nIndex); /// Locks the workstation's display, protecting it from unauthorized use. /// 0 on failure, non-zero for success [DllImport(Lib.User32, ExactSpelling = true, SetLastError = true)] [PInvokeData("Winuser.h")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool LockWorkStation(); /// Returns strings for standard message box buttons. /// The id of the string to return. These are identified by the Dialog Box Command ID values listed in winuser.h. /// The string, or NULL if not found. // https://docs.microsoft.com/en-us/windows/desktop/dlgbox/mb-getstring LPCWSTR WINAPI MB_GetString( UINT wBtn ); [DllImport(Lib.User32, SetLastError = false, ExactSpelling = true)] [PInvokeData("", MSDNShortId = "D2AF238D-F5A8-477D-BF47-0F5D4D68B27E")] [return: MarshalAs(UnmanagedType.LPWStr)] public static extern string MB_GetString(uint wBtn); /// /// Plays a waveform sound. The waveform sound for each sound type is identified by an entry in the registry. /// /// /// /// The sound to be played. The sounds are set by the user through the Sound control panel application, and then stored in the registry. /// /// This parameter can be one of the following values. /// /// /// Value /// Meaning /// /// /// 0xFFFFFFFF /// A simple beep. If the sound card is not available, the sound is generated using the speaker. /// /// /// MB_ICONASTERISK 0x00000040L /// See MB_ICONINFORMATION. /// /// /// MB_ICONEXCLAMATION 0x00000030L /// See MB_ICONWARNING. /// /// /// MB_ICONERROR 0x00000010L /// The sound specified as the Windows Critical Stop sound. /// /// /// MB_ICONHAND 0x00000010L /// See MB_ICONERROR. /// /// /// MB_ICONINFORMATION 0x00000040L /// The sound specified as the Windows Asterisk sound. /// /// /// MB_ICONQUESTION 0x00000020L /// The sound specified as the Windows Question sound. /// /// /// MB_ICONSTOP 0x00000010L /// See MB_ICONERROR. /// /// /// MB_ICONWARNING 0x00000030L /// The sound specified as the Windows Exclamation sound. /// /// /// MB_OK 0x00000000L /// The sound specified as the Windows Default Beep sound. /// /// /// /// /// If the function succeeds, the return value is nonzero. /// If the function fails, the return value is zero. To get extended error information, call GetLastError. /// /// /// After queuing the sound, the MessageBeep function returns control to the calling function and plays the sound asynchronously. /// /// If it cannot play the specified alert sound, MessageBeep attempts to play the system default sound. If it cannot play the /// system default sound, the function produces a standard beep sound through the computer speaker. /// /// The user can disable the warning beep by using the Sound control panel application. /// /// Note To send a beep to a remote client, use the Beep function. The Beep function is redirected to the client, /// whereas MessageBeep is not. /// /// // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-messagebeep BOOL MessageBeep( UINT uType ); [DllImport(Lib.User32, SetLastError = true, ExactSpelling = true)] [PInvokeData("winuser.h", MSDNShortId = "70681472-36a5-4ae3-b769-0421cf97ff2a")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool MessageBeep(uint uType); /// /// /// Displays a modal dialog box that contains a system icon, a set of buttons, and a brief application-specific message, such as /// status or error information. The message box returns an integer value that indicates which button the user clicked. /// /// /// /// Type: HWND /// /// A handle to the owner window of the message box to be created. If this parameter is NULL, the message box has no owner window. /// /// /// /// Type: LPCTSTR /// /// The message to be displayed. If the string consists of more than one line, you can separate the lines using a carriage return /// and/or linefeed character between each line. /// /// /// /// Type: LPCTSTR /// The dialog box title. If this parameter is NULL, the default title is Error. /// /// /// Type: UINT /// /// The contents and behavior of the dialog box. This parameter can be a combination of flags from the following groups of flags. /// /// To indicate the buttons displayed in the message box, specify one of the following values. /// /// /// Value /// Meaning /// /// /// MB_ABORTRETRYIGNORE 0x00000002L /// The message box contains three push buttons: Abort, Retry, and Ignore. /// /// /// MB_CANCELTRYCONTINUE 0x00000006L /// The message box contains three push buttons: Cancel, Try Again, Continue. Use this message box type instead of MB_ABORTRETRYIGNORE. /// /// /// MB_HELP 0x00004000L /// /// Adds a Help button to the message box. When the user clicks the Help button or presses F1, the system sends a WM_HELP message to /// the owner. /// /// /// /// MB_OK 0x00000000L /// The message box contains one push button: OK. This is the default. /// /// /// MB_OKCANCEL 0x00000001L /// The message box contains two push buttons: OK and Cancel. /// /// /// MB_RETRYCANCEL 0x00000005L /// The message box contains two push buttons: Retry and Cancel. /// /// /// MB_YESNO 0x00000004L /// The message box contains two push buttons: Yes and No. /// /// /// MB_YESNOCANCEL 0x00000003L /// The message box contains three push buttons: Yes, No, and Cancel. /// /// /// To display an icon in the message box, specify one of the following values. /// /// /// Value /// Meaning /// /// /// MB_ICONEXCLAMATION 0x00000030L /// An exclamation-point icon appears in the message box. /// /// /// MB_ICONWARNING 0x00000030L /// An exclamation-point icon appears in the message box. /// /// /// MB_ICONINFORMATION 0x00000040L /// An icon consisting of a lowercase letter i in a circle appears in the message box. /// /// /// MB_ICONASTERISK 0x00000040L /// An icon consisting of a lowercase letter i in a circle appears in the message box. /// /// /// MB_ICONQUESTION 0x00000020L /// /// A question-mark icon appears in the message box. The question-mark message icon is no longer recommended because it does not /// clearly represent a specific type of message and because the phrasing of a message as a question could apply to any message type. /// In addition, users can confuse the message symbol question mark with Help information. Therefore, do not use this question mark /// message symbol in your message boxes. The system continues to support its inclusion only for backward compatibility. /// /// /// /// MB_ICONSTOP 0x00000010L /// A stop-sign icon appears in the message box. /// /// /// MB_ICONERROR 0x00000010L /// A stop-sign icon appears in the message box. /// /// /// MB_ICONHAND 0x00000010L /// A stop-sign icon appears in the message box. /// /// /// To indicate the default button, specify one of the following values. /// /// /// Value /// Meaning /// /// /// MB_DEFBUTTON1 0x00000000L /// /// The first button is the default button. MB_DEFBUTTON1 is the default unless MB_DEFBUTTON2, MB_DEFBUTTON3, or MB_DEFBUTTON4 is specified. /// /// /// /// MB_DEFBUTTON2 0x00000100L /// The second button is the default button. /// /// /// MB_DEFBUTTON3 0x00000200L /// The third button is the default button. /// /// /// MB_DEFBUTTON4 0x00000300L /// The fourth button is the default button. /// /// /// To indicate the modality of the dialog box, specify one of the following values. /// /// /// Value /// Meaning /// /// /// MB_APPLMODAL 0x00000000L /// /// The user must respond to the message box before continuing work in the window identified by the hWnd parameter. However, the user /// can move to the windows of other threads and work in those windows. Depending on the hierarchy of windows in the application, the /// user may be able to move to other windows within the thread. All child windows of the parent of the message box are automatically /// disabled, but pop-up windows are not. MB_APPLMODAL is the default if neither MB_SYSTEMMODAL nor MB_TASKMODAL is specified. /// /// /// /// MB_SYSTEMMODAL 0x00001000L /// /// Same as MB_APPLMODAL except that the message box has the WS_EX_TOPMOST style. Use system-modal message boxes to notify the user /// of serious, potentially damaging errors that require immediate attention (for example, running out of memory). This flag has no /// effect on the user's ability to interact with windows other than those associated with hWnd. /// /// /// /// MB_TASKMODAL 0x00002000L /// /// Same as MB_APPLMODAL except that all the top-level windows belonging to the current thread are disabled if the hWnd parameter is /// NULL. Use this flag when the calling application or library does not have a window handle available but still needs to prevent /// input to other windows in the calling thread without suspending other threads. /// /// /// /// To specify other options, use one or more of the following values. /// /// /// Value /// Meaning /// /// /// MB_DEFAULT_DESKTOP_ONLY 0x00020000L /// /// Same as desktop of the interactive window station. For more information, see Window Stations. If the current input desktop is not /// the default desktop, MessageBox does not return until the user switches to the default desktop. /// /// /// /// MB_RIGHT 0x00080000L /// The text is right-justified. /// /// /// MB_RTLREADING 0x00100000L /// Displays message and caption text using right-to-left reading order on Hebrew and Arabic systems. /// /// /// MB_SETFOREGROUND 0x00010000L /// /// The message box becomes the foreground window. Internally, the system calls the SetForegroundWindow function for the message box. /// /// /// /// MB_TOPMOST 0x00040000L /// The message box is created with the WS_EX_TOPMOST window style. /// /// /// MB_SERVICE_NOTIFICATION 0x00200000L /// /// The caller is a service notifying the user of an event. The function displays a message box on the current active desktop, even /// if there is no user logged on to the computer. Terminal Services: If the calling thread has an impersonation token, the function /// directs the message box to the session specified in the impersonation token. If this flag is set, the hWnd parameter must be /// NULL. This is so that the message box can appear on a desktop other than the desktop corresponding to the hWnd. For information /// on security considerations in regard to using this flag, see Interactive Services. In particular, be aware that this flag can /// produce interactive content on a locked desktop and should therefore be used for only a very limited set of scenarios, such as /// resource exhaustion. /// /// /// /// /// /// Type: int /// /// If a message box has a Cancel button, the function returns the IDCANCEL value if either the ESC key is pressed or /// the Cancel button is selected. If the message box has no Cancel button, pressing ESC has no effect. /// /// If the function fails, the return value is zero. To get extended error information, call GetLastError. /// If the function succeeds, the return value is one of the following menu-item values. /// /// /// Return code/value /// Description /// /// /// IDABORT 3 /// The Abort button was selected. /// /// /// IDCANCEL 2 /// The Cancel button was selected. /// /// /// IDCONTINUE 11 /// The Continue button was selected. /// /// /// IDIGNORE 5 /// The Ignore button was selected. /// /// /// IDNO 7 /// The No button was selected. /// /// /// IDOK 1 /// The OK button was selected. /// /// /// IDRETRY 4 /// The Retry button was selected. /// /// /// IDTRYAGAIN 10 /// The Try Again button was selected. /// /// /// IDYES 6 /// The Yes button was selected. /// /// /// /// /// The following system icons can be used in a message box by setting the uType parameter to the corresponding flag value. /// /// /// Icon /// Flag values /// /// /// /// MB_ICONHAND, MB_ICONSTOP, or MB_ICONERROR /// /// /// /// MB_ICONQUESTION /// /// /// /// MB_ICONEXCLAMATION or MB_ICONWARNING /// /// /// /// MB_ICONASTERISK or MB_ICONINFORMATION /// /// /// /// Adding two right-to-left marks (RLMs), represented by Unicode formatting character U+200F, in the beginning of a MessageBox /// display string is interpreted by the MessageBox rendering engine so as to cause the reading order of the MessageBox to be /// rendered as right-to-left (RTL). /// /// /// When you use a system-modal message box to indicate that the system is low on memory, the strings pointed to by the lpText and /// lpCaption parameters should not be taken from a resource file because an attempt to load the resource may fail. /// /// /// If you create a message box while a dialog box is present, use a handle to the dialog box as the hWnd parameter. The hWnd /// parameter should not identify a child window, such as a control in a dialog box. /// /// Examples /// /// In the following example, the application displays a message box that prompts the user for an action after an error condition has /// occurred. The message box displays the message that describes the error condition and how to resolve it. The /// MB_CANCELTRYCONTINUE style directs MessageBox to provide three buttons with which the user can choose how to /// proceed. The MB_DEFBUTTON2 style sets the default focus on the second button of the message box, in this case, the Try /// Again button. /// /// The following image shows the output from the preceding code example: /// For another message box example, see Displaying a Message Box. /// // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-messagebox int MessageBox( HWND hWnd, LPCTSTR lpText, // LPCTSTR lpCaption, UINT uType ); [DllImport(Lib.User32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("winuser.h", MSDNShortId = "messagebox")] public static extern MB_RESULT MessageBox(HWND hWnd, string lpText, string lpCaption, MB_FLAGS uType); /// /// Creates, displays, and operates a message box. The message box contains application-defined message text and title, any icon, and /// any combination of predefined push buttons. /// /// A pointer to a MSGBOXPARAMS structure that contains information used to display the message box. /// /// If the function succeeds, the return value is one of the following menu-item values. /// /// If a message box has a Cancel button, the function returns the IDCANCEL value if either the ESC key is pressed or the Cancel /// button is selected.If the message box has no Cancel button, pressing ESC has no effect. /// /// If there is not enough memory to create the message box, the return value is zero. /// [DllImport(Lib.User32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("Winuser.h")] public static extern MB_RESULT MessageBoxIndirect(in MSGBOXPARAMS lpMsgBoxParams); /// /// Indicates that the system cannot be shut down and sets a reason string to be displayed to the user if system shutdown is initiated. /// /// A handle to the main window of the application. /// /// The reason the application must block system shutdown. This string will be truncated for display purposes after /// MAX_STR_BLOCKREASON characters. /// /// /// If the call succeeds, the return value is nonzero. If the call fails, the return value is zero. To get extended error /// information, call GetLastError. /// [DllImport(Lib.User32, SetLastError = true, ExactSpelling = true)] [PInvokeData("Winuser.h")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool ShutdownBlockReasonCreate(HWND hWnd, [MarshalAs(UnmanagedType.LPWStr)] string reason); /// Indicates that the system can be shut down and frees the reason string. /// A handle to the main window of the application. /// /// If the call succeeds, the return value is nonzero. If the call fails, the return value is zero. To get extended error /// information, call GetLastError. /// [DllImport(Lib.User32, SetLastError = true, ExactSpelling = true)] [PInvokeData("Winuser.h")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool ShutdownBlockReasonDestroy(HWND hWnd); /// Retrieves the reason string set by the function. /// A handle to the main window of the application. /// /// A pointer to a buffer that receives the reason string. If this parameter is NULL, the function retrieves the number of characters /// in the reason string. /// /// /// A pointer to a variable that specifies the size of the pwszBuff buffer, in characters. If the function succeeds, this variable /// receives the number of characters copied into the buffer, including the null-terminating character. If the buffer is too small, /// the variable receives the required buffer size, in characters, not including the null-terminating character. /// /// /// If the call succeeds, the return value is nonzero. If the call fails, the return value is zero. To get extended error /// information, call GetLastError. /// [DllImport(Lib.User32, SetLastError = true, ExactSpelling = true)] [PInvokeData("Winuser.h")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool ShutdownBlockReasonQuery(HWND hWnd, [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pwszBuff, ref uint pcchBuff); /// Retrieves the reason string set by the function. /// A handle to the main window of the application. /// On success, receives the reason string. /// /// If the call succeeds, the return value is nonzero. If the call fails, the return value is zero. To get extended error /// information, call GetLastError. /// public static bool ShutdownBlockReasonQuery(HWND hWnd, out string reason) { uint sz = 0; reason = null; if (!ShutdownBlockReasonQuery(hWnd, null, ref sz)) return false; var sb = new StringBuilder((int)sz); if (!ShutdownBlockReasonQuery(hWnd, sb, ref sz)) return false; reason = sb.ToString(); return true; } /// /// Retrieves or sets the value of one of the system-wide parameters. This function can also update the user profile while setting a parameter. /// /// /// Type: UINT /// /// The system-wide parameter to be retrieved or set. The possible values are organized in the following tables of related parameters: /// /// /// /// Type: UINT /// /// A parameter whose usage and format depends on the system parameter being queried or set. For more information about system-wide /// parameters, see the uiAction parameter. If not otherwise indicated, you must specify zero for this parameter. /// /// /// /// Type: PVOID /// /// A parameter whose usage and format depends on the system parameter being queried or set. For more information about system-wide /// parameters, see the uiAction parameter. If not otherwise indicated, you must specify NULL for this parameter. For /// information on the PVOID datatype, see Windows Data Types. /// /// /// /// Type: UINT /// /// If a system parameter is being set, specifies whether the user profile is to be updated, and if so, whether the /// WM_SETTINGCHANGE message is to be broadcast to all top-level windows to notify them of the change. /// /// /// This parameter can be zero if you do not want to update the user profile or broadcast the WM_SETTINGCHANGE message, or it /// can be one or more of the following values. /// /// /// /// /// Value /// Meaning /// /// /// SPIF_UPDATEINIFILE /// Writes the new system-wide parameter setting to the user profile. /// /// /// SPIF_SENDCHANGE /// Broadcasts the WM_SETTINGCHANGE message after updating the user profile. /// /// /// SPIF_SENDWININICHANGE /// Same as SPIF_SENDCHANGE. /// /// /// /// /// /// Type: /// If the function succeeds, the return value is a nonzero value. /// If the function fails, the return value is zero. To get extended error information, call GetLastError. /// // BOOL WINAPI SystemParametersInfo( _In_ UINT uiAction, _In_ UINT uiParam, _Inout_ PVOID pvParam, _In_ UINT fWinIni); https://msdn.microsoft.com/en-us/library/windows/desktop/ms724947(v=vs.85).aspx [DllImport(Lib.User32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("Winuser.h", MSDNShortId = "ms724947")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool SystemParametersInfo(SPI uiAction, uint uiParam, IntPtr pvParam, SPIF fWinIni); /// /// Retrieves or sets the value of one of the system-wide parameters. This function can also update the user profile while setting a parameter. /// /// /// Type: UINT /// /// The system-wide parameter to be retrieved or set. The possible values are organized in the following tables of related parameters: /// /// /// /// Type: UINT /// /// A parameter whose usage and format depends on the system parameter being queried or set. For more information about system-wide /// parameters, see the uiAction parameter. If not otherwise indicated, you must specify zero for this parameter. /// /// /// /// Type: PVOID /// /// A parameter whose usage and format depends on the system parameter being queried or set. For more information about system-wide /// parameters, see the uiAction parameter. If not otherwise indicated, you must specify NULL for this parameter. For /// information on the PVOID datatype, see Windows Data Types. /// /// /// /// Type: UINT /// /// If a system parameter is being set, specifies whether the user profile is to be updated, and if so, whether the /// WM_SETTINGCHANGE message is to be broadcast to all top-level windows to notify them of the change. /// /// /// This parameter can be zero if you do not want to update the user profile or broadcast the WM_SETTINGCHANGE message, or it /// can be one or more of the following values. /// /// /// /// /// Value /// Meaning /// /// /// SPIF_UPDATEINIFILE /// Writes the new system-wide parameter setting to the user profile. /// /// /// SPIF_SENDCHANGE /// Broadcasts the WM_SETTINGCHANGE message after updating the user profile. /// /// /// SPIF_SENDWININICHANGE /// Same as SPIF_SENDCHANGE. /// /// /// /// /// /// Type: /// If the function succeeds, the return value is a nonzero value. /// If the function fails, the return value is zero. To get extended error information, call GetLastError. /// // BOOL WINAPI SystemParametersInfo( _In_ UINT uiAction, _In_ UINT uiParam, _Inout_ PVOID pvParam, _In_ UINT fWinIni); https://msdn.microsoft.com/en-us/library/windows/desktop/ms724947(v=vs.85).aspx [DllImport(Lib.User32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("Winuser.h", MSDNShortId = "ms724947")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool SystemParametersInfo(SPI uiAction, uint uiParam, string pvParam, SPIF fWinIni); /// /// Retrieves or sets the value of one of the system-wide parameters. This function can also update the user profile while setting a parameter. /// /// /// Type: UINT /// /// The system-wide parameter to be retrieved or set. The possible values are organized in the following tables of related parameters: /// /// /// /// Type: UINT /// /// A parameter whose usage and format depends on the system parameter being queried or set. For more information about system-wide /// parameters, see the uiAction parameter. If not otherwise indicated, you must specify zero for this parameter. /// /// /// /// Type: PVOID /// /// A parameter whose usage and format depends on the system parameter being queried or set. For more information about system-wide /// parameters, see the uiAction parameter. If not otherwise indicated, you must specify NULL for this parameter. For /// information on the PVOID datatype, see Windows Data Types. /// /// /// /// Type: UINT /// /// If a system parameter is being set, specifies whether the user profile is to be updated, and if so, whether the /// WM_SETTINGCHANGE message is to be broadcast to all top-level windows to notify them of the change. /// /// /// This parameter can be zero if you do not want to update the user profile or broadcast the WM_SETTINGCHANGE message, or it /// can be one or more of the following values. /// /// /// /// /// Value /// Meaning /// /// /// SPIF_UPDATEINIFILE /// Writes the new system-wide parameter setting to the user profile. /// /// /// SPIF_SENDCHANGE /// Broadcasts the WM_SETTINGCHANGE message after updating the user profile. /// /// /// SPIF_SENDWININICHANGE /// Same as SPIF_SENDCHANGE. /// /// /// /// /// /// Type: /// If the function succeeds, the return value is a nonzero value. /// If the function fails, the return value is zero. To get extended error information, call GetLastError. /// // BOOL WINAPI SystemParametersInfo( _In_ UINT uiAction, _In_ UINT uiParam, _Inout_ PVOID pvParam, _In_ UINT fWinIni); https://msdn.microsoft.com/en-us/library/windows/desktop/ms724947(v=vs.85).aspx [DllImport(Lib.User32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("Winuser.h", MSDNShortId = "ms724947")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool SystemParametersInfo(SPI uiAction, uint uiParam, StringBuilder pvParam, [Optional] SPIF fWinIni); /// Retrives the value of one of the system-wide parameters. /// The type of the value to retrieve. /// The system-wide parameter to retrieve. /// The value to retrieve. /// /// If the function succeeds, the return value is . /// If the function fails, the return value is . To get extended error information, call GetLastError. /// /// Type mismatch. - getValue public static bool SystemParametersInfo(SPI uiAction, out T getValue) where T : struct { if (!CorrespondingTypeAttribute.CanGet(uiAction, typeof(T))) throw new ArgumentException("Type mismatch.", nameof(getValue)); SPIF spif = 0; var isBool = typeof(T) == typeof(bool); uint uv = InteropExtensions.SizeOf(isBool ? typeof(BOOL) : typeof(T)); using var ptr = new SafeHGlobalHandle((int)uv); if (IsSPITypeOrdinal()) uv = 0; else if (typeof(T).GetOrderedFields().FirstOrDefault()?.Name == "cbSize") ptr.Write(uv, false, 0); getValue = default; if (!SystemParametersInfo(uiAction, uv, (IntPtr)ptr, spif)) return false; getValue = isBool ? (T)(object)(bool)ptr.ToStructure() : ptr.ToStructure(); return true; } /// Sets the value of one of the system-wide parameters. This function can also update the user profile. /// The type of the value being set. /// The system-wide parameter to be set. /// The value to set. /// if set to true writes the new system-wide parameter setting to the user profile. /// if set to true broadcasts the WM_SETTINGCHANGE message after updating the user profile. /// /// If the function succeeds, the return value is . /// If the function fails, the return value is . To get extended error information, call GetLastError. /// /// Type mismatch. - setValue public static bool SystemParametersInfo(SPI uiAction, in T setValue, bool updateUserProfile = false, bool broadcastChange = true) where T : struct { if (!CorrespondingTypeAttribute.CanSet(uiAction, typeof(T))) throw new ArgumentException("Type mismatch.", nameof(setValue)); var spif = (updateUserProfile ? SPIF.SPIF_UPDATEINIFILE : 0) | (broadcastChange ? SPIF.SPIF_SENDCHANGE : 0); var setMethod = SPCorrespondingTypeAttribute.SetMethodIs(uiAction); if (setMethod is Pointer or Direct) { SafeHGlobalHandle ptr; if (setMethod == Pointer) { ptr = SafeHGlobalHandle.CreateFromStructure(setValue); } else // setMethod == Direct { var directValue = (int) Convert.ChangeType(setValue, typeof(int)); ptr = new SafeHGlobalHandle(new IntPtr(directValue), 0, false); } return SystemParametersInfo(uiAction, ptr.Size > sizeof(uint) ? ptr.Size : 0U, (IntPtr) ptr, spif); } else // setMethod == UiParam { var uiParam = (uint) Convert.ChangeType(setValue, typeof(uint)); return SystemParametersInfo(uiAction, uiParam, IntPtr.Zero, spif); } } private static bool IsSPITypeOrdinal() => typeof(T) == typeof(bool) || typeof(T) == typeof(uint) || typeof(T) == typeof(int) || typeof(T).IsEnum; /// /// Contains information about the time-out period associated with the Microsoft Win32 accessibility features. /// /// The accessibility time-out period is the length of time that must pass without keyboard and mouse input before the operating /// system automatically turns off accessibility features.The accessibility time-out is designed for computers that are shared by /// several users so that options selected by one user do not inconvenience a subsequent user. /// /// /// The accessibility features affected by the time-out are the FilterKeys features(SlowKeys, BounceKeys, and RepeatKeys), MouseKeys, /// ToggleKeys, and StickyKeys.The accessibility time-out also affects the high contrast mode setting. /// /// [PInvokeData("Winuser.h")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ACCESSTIMEOUT { /// Specifies the size, in bytes, of this structure. public uint cbSize; /// A set of bit flags that specify properties of the time-out behavior for accessibility features. public ATF dwFlags; /// Specifies the time-out period, in milliseconds. public uint iTimeOutMSec; } /// /// Describes the animation effects associated with user actions. This structure is used with the SystemParametersInfo /// function when the SPI_GETANIMATION or SPI_SETANIMATION action value is specified. /// // typedef struct tagANIMATIONINFO { UINT cbSize; int iMinAnimate;} ANIMATIONINFO, *LPANIMATIONINFO; https://msdn.microsoft.com/en-us/library/windows/desktop/ms724197(v=vs.85).aspx [PInvokeData("Winuser.h", MSDNShortId = "ms724197")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ANIMATIONINFO { /// The size of the structure, in bytes. The caller must set this to . public uint cbSize; /// If this member is nonzero, minimize and restore animation is enabled; otherwise it is disabled. [MarshalAs(UnmanagedType.Bool)] public bool iMinAnimate; } /// /// Contains information associated with audio descriptions. This structure is used with the SystemParametersInfo function /// when the SPI_GETAUDIODESCRIPTION or SPI_SETAUDIODESCRIPTION action value is specified. /// // typedef struct tagAUDIODESCRIPTION { UINT cbSize; BOOL Enabled; LCID Locale;} AUDIODESCRIPTION, *LPAUDIODESCRIPTION; https://msdn.microsoft.com/en-us/library/windows/desktop/aa379651(v=vs.85).aspx [PInvokeData("Winuser.h", MSDNShortId = "aa379651")] [StructLayout(LayoutKind.Sequential)] public struct AUDIODESCRIPTION { /// The size of the structure, in bytes. The caller must set this member to . public uint cbSize; /// If this member is TRUE, audio descriptions are enabled; Otherwise, this member is FALSE. [MarshalAs(UnmanagedType.Bool)] public bool Enabled; /// /// The locale identifier (LCID) of the language for the audio description. For more information, see Locales and Languages. /// public uint Locale; } /// /// Contains information about the FilterKeys accessibility feature, which enables a user with disabilities to set the keyboard /// repeat rate (RepeatKeys), acceptance delay (SlowKeys), and bounce rate (BounceKeys). /// [PInvokeData("Winuser.h")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct FILTERKEYS { /// Specifies the structure size, in bytes. public uint cbSize; /// A set of bit flags that specify properties of the FilterKeys feature. public FKF dwFlags; /// /// Specifies the length of time, in milliseconds, that the user must hold down a key before it is accepted by the computer. /// public uint iWaitMSec; /// Specifies the length of time, in milliseconds, that the user must hold down a key before it begins to repeat. public uint iDelayMSec; /// Specifies the length of time, in milliseconds, between each repetition of the keystroke. public uint iRepeatMSec; /// /// Specifies the length of time, in milliseconds, that must elapse after releasing a key before the computer will accept a /// subsequent press of the same key. /// public uint iBounceMSec; } /// Contains information about an item for which context-sensitive Help has been requested. [PInvokeData("Winuser.h")] [StructLayout(LayoutKind.Sequential)] public struct HELPINFO { /// The structure size, in bytes. public uint cbSize; /// The type of context for which Help is requested. This member can be one of the following values. public HELPINFOCONTEXT iContextType; /// /// The identifier of the window or control if iContextType is HELPINFO_WINDOW, or identifier of the menu item if iContextType is HELPINFO_MENUITEM. /// public int iCtrlId; /// /// The identifier of the child window or control if iContextType is HELPINFO_WINDOW, or identifier of the associated menu if /// iContextType is HELPINFO_MENUITEM. /// public IntPtr hItemHandle; /// The help context identifier of the window or control. public IntPtr dwContextId; /// /// The POINT structure that contains the screen coordinates of the mouse cursor. This is useful for providing Help based on the /// position of the mouse cursor. /// public POINT MousePos; } /// /// Contains information about the high contrast accessibility feature. This feature sets the appearance scheme of the user interface /// for maximum visibility for a visually-impaired user, and advises applications to comply with this appearance scheme. /// [PInvokeData("Winuser.h")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct HIGHCONTRAST { /// Specifies the size, in bytes, of this structure. public uint cbSize; /// A set of bit flags that specify properties of the HighContrast feature. public HFC dwFlags; /// Points to a string that contains the name of the color scheme that will be set to the default scheme. public string lpszDefaultScheme; } /// /// Contains the scalable metrics associated with icons. This structure is used with the SystemParametersInfo function when the /// SPI_GETICONMETRICS or SPI_SETICONMETRICS action is specified. /// [PInvokeData("Winuser.h")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct ICONMETRICS { /// The size of the structure, in bytes. public uint cbSize; /// The horizontal space, in pixels, for each arranged icon. public int iHorzSpacing; /// The vertical space, in pixels, for each arranged icon. public int iVertSpacing; /// If this member is nonzero, icon titles wrap to a new line. [MarshalAs(UnmanagedType.Bool)] public bool iTitleWrap; /// The font to use for icon titles. public LOGFONT lfFont; } /// /// Contains the scalable metrics associated with minimized windows. This structure is used with the SystemParametersInfo /// function when the SPI_GETMINIMIZEDMETRICS or SPI_SETMINIMIZEDMETRICS action value is specified. /// // typedef struct tagMINIMIZEDMETRICS { UINT cbSize; int iWidth; int iHorzGap; int iVertGap; int iArrange;} MINIMIZEDMETRICS, *PMINIMIZEDMETRICS, // *LPMINIMIZEDMETRICS; https://msdn.microsoft.com/en-us/library/windows/desktop/ms724500(v=vs.85).aspx [PInvokeData("Winuser.h", MSDNShortId = "ms724500")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MINIMIZEDMETRICS { /// The size of the structure, in bytes. The caller must set this to . public uint cbSize; /// The width of minimized windows, in pixels. public int iWidth; /// The horizontal space between arranged minimized windows, in pixels. public int iHorzGap; /// The vertical space between arranged minimized windows, in pixels. public int iVertGap; /// /// /// The starting position and direction used when arranging minimized windows. The starting position must be one of the following values. /// /// /// /// /// Value /// Meaning /// /// /// ARW_BOTTOMLEFT0x0000L /// Start at the lower-left corner of the work area. /// /// /// ARW_BOTTOMRIGHT0x0001L /// Start at the lower-right corner of the work area. /// /// /// ARW_TOPLEFT0x0002L /// Start at the upper-left corner of the work area. /// /// /// ARW_TOPRIGHT0x0003L /// Start at the upper-right corner of the work area. /// /// /// /// The direction must be one of the following values. /// /// /// /// Value /// Meaning /// /// /// ARW_LEFT0x0000L /// Arrange left (valid with ARW_BOTTOMRIGHT and ARW_TOPRIGHT only). /// /// /// ARW_RIGHT0x0000L /// Arrange right (valid with ARW_BOTTOMLEFT and ARW_TOPLEFT only). /// /// /// ARW_UP0x0004L /// Arrange up (valid with ARW_BOTTOMLEFT and ARW_BOTTOMRIGHT only). /// /// /// ARW_DOWN0x0004L /// Arrange down (valid with ARW_TOPLEFT and ARW_TOPRIGHT only). /// /// /// ARW_HIDE0x0008L /// Hide minimized windows by moving them off the visible area of the screen. /// /// /// /// public ARW iArrange; } /// /// Contains information about the MouseKeys accessibility feature. When the MouseKeys feature is active, the user can use the /// numeric keypad to control the mouse pointer, and to click, double-click, drag, and drop. By pressing NUMLOCK, the user can toggle /// the numeric keypad between mouse control mode and normal operation. /// [PInvokeData("Winuser.h")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MOUSEKEYS { /// Specifies the size, in bytes, of this structure. public uint cbSize; /// A set of bit-flags that specify properties of the MouseKeys feature. public MKF dwFlags; /// Specifies the maximum speed the mouse cursor attains when an arrow key is held down. public uint iMaxSpeed; /// /// Specifies the length of time, in milliseconds, that it takes for the mouse cursor to reach maximum speed when an arrow key is /// held down. Valid values are from 1000 to 5000. /// public uint iTimeToMaxSpeed; /// /// Specifies the multiplier to apply to the mouse cursor speed when the user holds down the CTRL key while using the arrow keys /// to move the cursor. this value is ignored if MKF_MODIFIERS is not set. /// public uint iCtrlSpeed; /// This member is reserved for future use. It must be set to zero. public uint dwReserved1; /// This member is reserved for future use. It must be set to zero. public uint dwReserved2; } /// Contains information used to display a message box. The MessageBoxIndirect function uses this structure. [PInvokeData("Winuser.h")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MSGBOXPARAMS { /// The structure size, in bytes. public uint cbSize; /// A handle to the owner window. This member can be NULL. public HWND hwndOwner; /// /// A handle to the module that contains the icon resource identified by the lpszIcon member, and the string resource identified /// by the lpszText or lpszCaption member. /// public HINSTANCE hInstance; /// A null-terminated string, or the identifier of a string resource, that contains the message to be displayed. public string lpszText; /// /// A null-terminated string, or the identifier of a string resource, that contains the message box title. If this member is /// NULL, the default title Error is used. /// public string lpszCaption; /// /// The contents and behavior of the dialog box. This member can be a combination of flags described for the uType parameter of /// the MessageBoxEx function. /// /// In addition, you can specify the MB_USERICON flag(0x00000080L) if you want the message box to display the icon specified by /// the lpszIcon member. /// /// public MB_FLAGS dwStyle; /// /// Identifies an icon resource. This parameter can be either a null-terminated string or an integer resource identifier passed /// to the MAKEINTRESOURCE macro. /// /// To load one of the standard system-defined icons, set the hInstance member to NULL and set lpszIcon to one of the values /// listed with the LoadIcon function. /// /// This member is ignored if the dwStyle member does not specify the MB_USERICON flag. /// public IntPtr lpszIcon; /// /// Identifies a help context. If a help event occurs, this value is specified in the HELPINFO structure that the message box /// sends to the owner window or callback function. /// public IntPtr dwContextHelpId; /// /// A pointer to the callback function that processes help events for the message box. /// If this member is NULL, the message box sends WM_HELP messages to the owner window when help events occur. /// public MsgBoxCallback lpfnMsgBoxCallback; /// /// The language in which to display the text contained in the predefined push buttons. This value must be in the form returned /// by the MAKELANGID macro. /// /// For a list of supported language identifiers, see Language Identifiers.Note that each localized release of Windows typically /// contains resources only for a limited set of languages.Thus, for example, the U.S.version offers LANG_ENGLISH, the French /// version offers LANG_FRENCH, the German version offers LANG_GERMAN, and the Japanese version offers LANG_JAPANESE. Each /// version offers LANG_NEUTRAL. This limits the set of values that can be used with the dwLanguageId parameter. Before /// specifying a language identifier, you should enumerate the locales that are installed on a system. /// /// public uint dwLanguageId; } /// /// Contains the scalable metrics associated with the nonclient area of a nonminimized window. This structure is used by the /// SPI_GETNONCLIENTMETRICS and SPI_SETNONCLIENTMETRICS actions of the SystemParametersInfo function. /// // typedef struct tagNONCLIENTMETRICS { UINT cbSize; int iBorderWidth; int iScrollWidth; int iScrollHeight; int iCaptionWidth; int // iCaptionHeight; LOGFONT lfCaptionFont; int iSmCaptionWidth; int iSmCaptionHeight; LOGFONT lfSmCaptionFont; int iMenuWidth; int // iMenuHeight; LOGFONT lfMenuFont; LOGFONT lfStatusFont; LOGFONT lfMessageFont;#if (WINVER >= 0x0600) int // iPaddedBorderWidth;#endif } NONCLIENTMETRICS, *PNONCLIENTMETRICS, // *LPNONCLIENTMETRICS; https://msdn.microsoft.com/en-us/library/windows/desktop/ff729175(v=vs.85).aspx [PInvokeData("Winuser.h", MSDNShortId = "ff729175")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct NONCLIENTMETRICS { /// /// The size of the structure, in bytes. The caller must set this to sizeof(NONCLIENTMETRICS). For information about application /// compatibility, see Remarks. /// public uint cbSize; /// The thickness of the sizing border, in pixels. The default is 1 pixel. public int iBorderWidth; /// The width of a standard vertical scroll bar, in pixels. public int iScrollWidth; /// The height of a standard horizontal scroll bar, in pixels. public int iScrollHeight; /// The width of caption buttons, in pixels. public int iCaptionWidth; /// The height of caption buttons, in pixels. public int iCaptionHeight; /// A LOGFONT structure that contains information about the caption font. public LOGFONT lfCaptionFont; /// The width of small caption buttons, in pixels. public int iSMCaptionWidth; /// The height of small captions, in pixels. public int iSMCaptionHeight; /// A LOGFONT structure that contains information about the small caption font. public LOGFONT lfSMCaptionFont; /// The width of menu-bar buttons, in pixels. public int iMenuWidth; /// The height of a menu bar, in pixels. public int iMenuHeight; /// A LOGFONT structure that contains information about the font used in menu bars. public LOGFONT lfMenuFont; /// A LOGFONT structure that contains information about the font used in status bars and tooltips. public LOGFONT lfStatusFont; /// A LOGFONT structure that contains information about the font used in message boxes. public LOGFONT lfMessageFont; /// /// /// The thickness of the padded border, in pixels. The default value is 4 pixels. The iPaddedBorderWidth and /// iBorderWidth members are combined for both resizable and nonresizable windows in the Windows Aero desktop experience. /// To compile an application that uses this member, define _WIN32_WINNT as 0x0600 or later. For more information, see Remarks. /// /// Windows Server 2003 and Windows XP/2000: This member is not supported. /// public int iPaddedBorderWidth; } /// /// Contains information about the SerialKeys accessibility feature, which interprets data from a communication aid attached to a /// serial port as commands causing the system to simulate keyboard and mouse input. /// [PInvokeData("Winuser.h")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SERIALKEYS { /// Specifies the structure size, in bytes. public uint cbSize; /// A set of bit-flags that specify properties of the SerialKeys feature. public SERKF dwFlags; /// /// Points to a string that contains the name of the serial port that receives input from the communication aid when the /// SerialKeys feature is on. If no port is being used, this member is NULL. If this member is "Auto", the system watches all /// unused serial ports for input from communication aids. /// public string lpszActivePort; /// Reserved; must be NULL. public IntPtr lpszPort; /// /// Specifies the baud rate setting for the serial port specified by the lpszActivePort member. This member should be set to one /// of the CBR_ values defined in the winbase.h header file. If lpszActivePort is NULL, this member is zero. /// public uint iBaudRate; /// /// Specifies the state of the port specified by the lpszActivePort member. If lpszActivePort is NULL, iPortState is zero; /// otherwise, it is one of the following values: /// /// /// Value /// Meaning /// /// /// 0 /// All input on this port is ignored by the SerialKeys feature. /// /// /// 1 /// /// Input on this port is watched for SerialKeys activation sequences when no other application has the port open. /// /// /// /// 2 /// All input on this port is treated as SerialKeys commands. /// /// /// public uint iPortState; /// Specifies the active port. public uint iActive; } /// /// Contains information about the SoundSentry accessibility feature. When the SoundSentry feature is on, the computer displays a /// visual indication only when a sound is generated. /// [PInvokeData("Winuser.h")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SOUNDSENTRY { /// Specifies the size, in bytes, of this structure. public uint cbSize; /// A set of bit flags that specify properties of the SoundSentry feature. public SSF dwFlags; /// /// Specifies the visual signal to present when a text-mode application generates a sound while running in a full-screen virtual machine. /// public SSTF iFSTextEffect; /// /// Specifies the duration, in milliseconds, of the visual signal that is displayed when a full-screen, text-mode application /// generates a sound. /// public uint iFSTextEffectMSec; /// /// Specifies the RGB value of the color to be used when displaying the visual signal shown when a full-screen, text-mode /// application generates a sound. /// public COLORREF iFSTextEffectColorBits; /// /// Specifies the visual signal to present when a graphics-mode application generates a sound while running in a full-screen /// virtual machine. /// public SSGF iFSGrafEffect; /// /// Specifies the duration, in milliseconds, of the visual signal that is displayed when a full-screen, graphics-mode application /// generates a sound. /// public uint iFSGrafEffectMSec; /// /// Specifies the RGB value of the color to be used when displaying the visual signal shown when a full-screen, graphics-mode /// application generates a sound. /// public COLORREF iFSGrafEffectColor; /// /// Specifies the visual signal to display when a sound is generated by a Windows-based application or an MS-DOS application /// running in a window. /// public SSWF iWindowsEffect; /// /// Specifies the duration, in milliseconds, of the visual signal that is displayed when a Win32-based application (or an /// application running in a window) generates a sound. /// public uint iWindowsEffectMSec; /// This member is reserved for future use. It should be set to NULL. public IntPtr lpszWindowsEffectDLL; /// This member is reserved for future use. It must be set to zero. public uint iWindowsEffectOrdinal; } /// /// Contains information about the StickyKeys accessibility feature. When the StickyKeys feature is on, the user can press a modifier /// key (SHIFT, CTRL, or ALT) and then another key in sequence rather than at the same time, to enter shifted (modified) characters /// and other key combinations. Pressing a modifier key once latches the key down until the user presses a non-modifier key or clicks /// a mouse button. Pressing a modifier key twice locks the key until the user presses the key a third time. /// [PInvokeData("Winuser.h")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct STICKYKEYS { /// Specifies the size, in bytes, of this structure. public uint cbSize; /// A set of bit-flags that specify properties of the StickyKeys feature. public SKF dwFlags; } /// /// Contains information about the ToggleKeys accessibility feature. When the ToggleKeys feature is on, the computer emits a /// high-pitched tone whenever the user turns on the CAPS LOCK, NUM LOCK, or SCROLL LOCK key, and a low-pitched tone whenever the /// user turns off one of those keys. /// [PInvokeData("Winuser.h")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct TOGGLEKEYS { /// Specifies the size, in bytes, of this structure. public uint cbSize; /// A set of bit flags that specify properties of the ToggleKeys feature. public TKF dwFlags; } /// /// Contains hardware input details that can be used to predict touch targets and help compensate for hardware latency when /// processing touch and gesture input that contains distance and velocity data. /// // typedef struct tagTouchPredictionParameters { UINT cbSize; UINT dwLatency; UINT dwSampleTime; UINT bUseHWTimeStamp;} // TouchPredictionParameters, *PTouchPredictionParameters; https://msdn.microsoft.com/en-us/library/windows/desktop/hh969214(v=vs.85).aspx [PInvokeData("Winuser.h", MSDNShortId = "hh969214")] public struct TOUCHPREDICTIONPARAMETERS { /// Use timestamps provided by the hardware. [MarshalAs(UnmanagedType.Bool)] public bool bUseHWTimeStamp; /// The size of this structure, in bytes. public uint cbSize; /// Latency in milliseconds. public uint dwLatency; /// Sample time in milliseconds (used to calculate velocity). public uint dwSampleTime; } internal class SPCorrespondingTypeAttribute : CorrespondingTypeAttribute { internal enum SetParameterMethod { Pointer, Direct, UiParam } public SPCorrespondingTypeAttribute(Type typeRef, CorrespondingAction action, SetParameterMethod type = Pointer) : base(typeRef, action) => Type = type; public SetParameterMethod Type { get; } public static SetParameterMethod SetMethodIs(object value) => GetAttrForObj(value).OfType().FirstOrDefault()?.Type ?? Pointer; } } }