using System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.InteropServices; namespace RobvanderWoude { [InterfaceType( ComInterfaceType.InterfaceIsIDispatch )] public interface _GetSystemMetricsDLL { [DispId( 1 )] string GetHelp( ); [DispId( 2 )] int GetPropertyValue( object property ); [DispId( 3 )] string GetVersion( ); [DispId( 4 )] string ListPropertyNames( ); [DispId( 5 )] string ListPropertyValues( ); } [ComVisible( true )] [ClassInterface( ClassInterfaceType.AutoDispatch )] [ProgId( "RobvanderWoude.GetSystemMetrics" )] public class GetSystemMetricsDLL : _GetSystemMetricsDLL { private static string mypath = Assembly.GetAssembly( typeof( RobvanderWoude.GetSystemMetricsDLL ) ).Location.ToString( ); public string GetHelp( ) { string helptemplate = "{0}, Version {1}\n{2}\n\nUsage in VBScript:\n\n"; helptemplate += "Set objSystemMetrics = CreateObject( \"RobvanderWoude.GetSystemMetricsDLL\" )\n\n"; helptemplate += "' Read some property values\n"; helptemplate += "WScript.Echo objSystemMetrics.SM_CXSCREEN\n"; helptemplate += "WScript.Echo objSystemMetrics.SM_CMONITORS\n"; helptemplate += "WScript.Echo objSystemMetrics.GetPropertyValue( \"SM_CMONITORS\" )\n\n"; helptemplate += "' Get the DLL's version\n"; helptemplate += "WScript.Echo objSystemMetrics.GetVersion( )\n\n"; helptemplate += "' List all available property names\n"; helptemplate += "WScript.Echo objSystemMetrics.ListPropertyNames( )\n\n"; helptemplate += "' List all property names and their values\n"; helptemplate += "Wscript.Echo objSystemMetrics.ListPropertyValues( )\n\n"; helptemplate += "' Show this help text\n"; helptemplate += "Wscript.Echo objSystemMetrics.GetHelp( )\n\n"; helptemplate += "Note: All property values are returned as 32-bit integer.\n\n"; helptemplate += " The meaning of the returned metric values can be found at\n"; helptemplate += " https://msdn.microsoft.com/library/windows/desktop/ms724385.aspx\n\n"; helptemplate += "Credits: SystemMetric enumeration published by Gabriel T. Sharp on PInvoke.net\n"; helptemplate += " http://pinvoke.net/default.aspx/Enums/SystemMetric.html\n\n"; helptemplate += "{3}\n"; helptemplate += "http://www.robvanderwoude.com\n"; FileVersionInfo myfileversioninfo = FileVersionInfo.GetVersionInfo( mypath ); string filename = Path.GetFileName( myfileversioninfo.FileName ); string fileversion = myfileversioninfo.FileVersion; string filecomment = myfileversioninfo.Comments; string copyrights = myfileversioninfo.LegalCopyright.Replace( "\u00E9", "(C)" ); string description = String.Format( helptemplate, filename, fileversion, filecomment, copyrights ); return description; } public int GetPropertyValue( object property ) { try { int propertynumber = (int) Enum.Parse( typeof( SystemMetric ), property.ToString( ) ); return Convert.ToInt32( this.GetType( ).GetProperty( Enum.GetName( typeof( SystemMetric ), propertynumber ) ).GetValue( this, null ) ); } catch { return -1; } } public string GetVersion( ) { return FileVersionInfo.GetVersionInfo( mypath ).FileVersion; } public string ListPropertyNames( ) { string result = String.Empty; foreach ( PropertyInfo property in this.GetType( ).GetProperties( ) ) { result += property.Name + "\n"; } return result; } public string ListPropertyValues( ) { string result = String.Empty; foreach ( PropertyInfo property in this.GetType( ).GetProperties( ) ) { string val = String.Empty; try { val = property.GetValue( this, null ).ToString( ); } catch { }; result += String.Format( "{0}={1}\n", property.Name, val ); } return result; } #region Properties public int SM_ARRANGE { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_ARRANGE ) ); } } public int SM_CLEANBOOT { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CLEANBOOT ) ); } } public int SM_CMONITORS { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CMONITORS ) ); } } public int SM_CMOUSEBUTTONS { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CMOUSEBUTTONS ) ); } } public int SM_CXBORDER { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXBORDER ) ); } } public int SM_CXCURSOR { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXCURSOR ) ); } } public int SM_CXDLGFRAME { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXDLGFRAME ) ); } } public int SM_CXDOUBLECLK { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXDOUBLECLK ) ); } } public int SM_CXDRAG { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXDRAG ) ); } } public int SM_CXEDGE { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXEDGE ) ); } } public int SM_CXFIXEDFRAME { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXFIXEDFRAME ) ); } } public int SM_CXFOCUSBORDER { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXFOCUSBORDER ) ); } } public int SM_CXFRAME { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXFRAME ) ); } } public int SM_CXFULLSCREEN { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXFULLSCREEN ) ); } } public int SM_CXHSCROLL { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXHSCROLL ) ); } } public int SM_CXHTHUMB { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXHTHUMB ) ); } } public int SM_CXICON { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXICON ) ); } } public int SM_CXICONSPACING { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXICONSPACING ) ); } } public int SM_CXMAXIMIZED { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXMAXIMIZED ) ); } } public int SM_CXMAXTRACK { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXMAXTRACK ) ); } } public int SM_CXMENUCHECK { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXMENUCHECK ) ); } } public int SM_CXMENUSIZE { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXMENUSIZE ) ); } } public int SM_CXMIN { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXMIN ) ); } } public int SM_CXMINIMIZED { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXMINIMIZED ) ); } } public int SM_CXMINSPACING { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXMINSPACING ) ); } } public int SM_CXMINTRACK { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXMINTRACK ) ); } } public int SM_CXPADDEDBORDER { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXPADDEDBORDER ) ); } } public int SM_CXSCREEN { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXSCREEN ) ); } } public int SM_CXSIZE { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXSIZE ) ); } } public int SM_CXSIZEFRAME { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXSIZEFRAME ) ); } } public int SM_CXSMICON { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXSMICON ) ); } } public int SM_CXSMSIZE { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXSMSIZE ) ); } } public int SM_CXVIRTUALSCREEN { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXVIRTUALSCREEN ) ); } } public int SM_CXVSCROLL { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CXVSCROLL ) ); } } public int SM_CYBORDER { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYBORDER ) ); } } public int SM_CYCAPTION { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYCAPTION ) ); } } public int SM_CYCURSOR { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYCURSOR ) ); } } public int SM_CYDLGFRAME { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYDLGFRAME ) ); } } public int SM_CYDOUBLECLK { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYDOUBLECLK ) ); } } public int SM_CYDRAG { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYDRAG ) ); } } public int SM_CYEDGE { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYEDGE ) ); } } public int SM_CYFIXEDFRAME { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYFIXEDFRAME ) ); } } public int SM_CYFOCUSBORDER { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYFOCUSBORDER ) ); } } public int SM_CYFRAME { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYFRAME ) ); } } public int SM_CYFULLSCREEN { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYFULLSCREEN ) ); } } public int SM_CYHSCROLL { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYHSCROLL ) ); } } public int SM_CYICON { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYICON ) ); } } public int SM_CYICONSPACING { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYICONSPACING ) ); } } public int SM_CYKANJIWINDOW { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYKANJIWINDOW ) ); } } public int SM_CYMAXIMIZED { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYMAXIMIZED ) ); } } public int SM_CYMAXTRACK { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYMAXTRACK ) ); } } public int SM_CYMENU { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYMENU ) ); } } public int SM_CYMENUCHECK { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYMENUCHECK ) ); } } public int SM_CYMENUSIZE { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYMENUSIZE ) ); } } public int SM_CYMIN { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYMIN ) ); } } public int SM_CYMINIMIZED { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYMINIMIZED ) ); } } public int SM_CYMINSPACING { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYMINSPACING ) ); } } public int SM_CYMINTRACK { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYMINTRACK ) ); } } public int SM_CYSCREEN { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYSCREEN ) ); } } public int SM_CYSIZE { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYSIZE ) ); } } public int SM_CYSIZEFRAME { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYSIZEFRAME ) ); } } public int SM_CYSMCAPTION { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYSMCAPTION ) ); } } public int SM_CYSMICON { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYSMICON ) ); } } public int SM_CYSMSIZE { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYSMSIZE ) ); } } public int SM_CYVIRTUALSCREEN { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYVIRTUALSCREEN ) ); } } public int SM_CYVSCROLL { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYVSCROLL ) ); } } public int SM_CYVTHUMB { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_CYVTHUMB ) ); } } public int SM_DBCSENABLED { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_DBCSENABLED ) ); } } public int SM_DEBUG { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_DEBUG ) ); } } public int SM_DIGITIZER { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_DIGITIZER ) ); } } public int SM_IMMENABLED { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_IMMENABLED ) ); } } public int SM_MAXIMUMTOUCHES { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_MAXIMUMTOUCHES ) ); } } public int SM_MEDIACENTER { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_MEDIACENTER ) ); } } public int SM_MENUDROPALIGNMENT { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_MENUDROPALIGNMENT ) ); } } public int SM_MIDEASTENABLED { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_MIDEASTENABLED ) ); } } public int SM_MOUSEHORIZONTALWHEELPRESENT { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_MOUSEHORIZONTALWHEELPRESENT ) ); } } public int SM_MOUSEPRESENT { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_MOUSEPRESENT ) ); } } public int SM_MOUSEWHEELPRESENT { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_MOUSEWHEELPRESENT ) ); } } public int SM_NETWORK { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_NETWORK ) ); } } public int SM_PENWINDOWS { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_PENWINDOWS ) ); } } public int SM_REMOTECONTROL { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_REMOTECONTROL ) ); } } public int SM_REMOTESESSION { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_REMOTESESSION ) ); } } public int SM_SAMEDISPLAYFORMAT { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_SAMEDISPLAYFORMAT ) ); } } public int SM_SECURE { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_SECURE ) ); } } public int SM_SERVERR2 { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_SERVERR2 ) ); } } public int SM_SHOWSOUNDS { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_SHOWSOUNDS ) ); } } public int SM_SHUTTINGDOWN { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_SHUTTINGDOWN ) ); } } public int SM_SLOWMACHINE { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_SLOWMACHINE ) ); } } public int SM_STARTER { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_STARTER ) ); } } public int SM_SWAPBUTTON { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_SWAPBUTTON ) ); } } public int SM_TABLETPC { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_TABLETPC ) ); } } public int SM_XVIRTUALSCREEN { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_XVIRTUALSCREEN ) ); } } public int SM_YVIRTUALSCREEN { get { return Convert.ToInt32( GetSystemMetrics( SystemMetric.SM_YVIRTUALSCREEN ) ); } } #endregion Properties #region DLL Import [DllImport( "user32.dll" )] static extern int GetSystemMetrics( SystemMetric smIndex ); #endregion DLL Import #region Properties Enumeration /// /// Flags used with the Windows API (User32.dll):GetSystemMetrics(SystemMetric smIndex) /// /// This Enum and declaration signature was written by Gabriel T. Sharp /// ai_productions@verizon.net or osirisgothra@hotmail.com /// Obtained on pinvoke.net, please contribute your code to support the wiki! /// public enum SystemMetric : int { /// /// 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, /// /// 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 DrawFocusRectdraws. /// 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 SystemParametersInfofunction 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 byDrawFocusRect. /// 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, seeWTSGetActiveConsoleSessionId. /// 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, /// /// 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, } #endregion Properties Enumeration } }