Many system information is included in the SystemInformation class properties.
using System; using System.Drawing; using System.Windows.Forms; namespace WindowsProgram {public class SysInfoString {public SysInfoString () {} public static string [] lables {get {return new string [] { "ArrangeStartingPosition", "ArrangeStartingPosition" , "BootMode", "Border3DSize", "BorderSize", "CaptionButtonSize", "CaptionHeight", "ComputerName", "CursorSize", "DbcsEnabled", "DebugOS", "DoubleClickSize", "doubleClickTime", "DragFullWindows", " DragSize "," FixedFrameBorderSize "," FrameBorderSize "," HighContrast "," HorizontalScrollBarArrowWidth "," HorizontalScrollBarHeight "," HorizontalScrollBarThumbWidth "," iconSize "," IconSpacingSize "," KanjiWindowHeight "," MaxWindowTrackSize "," MenuButtonSize "," MenuCheckSize " , "Menuheight", "Mideastenabled", "MinimumWindowsize"};}} public static float maxlablewidth (graphics grfx, font font) {Return MaxWIDT H (lables, grfx, font);} public static int count {get {return lables.length;}} static float maxwidth (String [] Astr, Graphics GRFX, FONT font) {float fmax = 0; Foreach (String Str in Astr) Fmax = Math.max (Fmax, Grfx.measureString (STR, FONT) .width; Return FMAX;
} Public static string [] values {get {return new string [] {SystemInformation.ArrangeStartingPosition.ToString (), SystemInformation.ArrangeStartingPosition.ToString (), SystemInformation.BootMode.ToString (), SystemInformation.Border3DSize.ToString (), SystemInformation. BorderSize.ToString (), SystemInformation.CaptionButtonSize.ToString (), SystemInformation.CaptionHeight.ToString (), SystemInformation.ComputerName.ToString (), SystemInformation.CursorSize.ToString (), SystemInformation.DbcsEnabled.ToString (), SystemInformation.DebugOS. ToString (), SystemInformation.DoubleClickSize.ToString (), SystemInformation.DoubleClickTime.ToString (), SystemInformation.DragFullWindows.ToString (), SystemInformation.DragSize.ToString (), SystemInformation.FixedFrameBorderSize.ToString (), SystemInformation.FrameBorderSize.ToString ( ), Systeminformation.highcontrast.toString (), Systeminformation.horizontalscrollbaRrowwIDT h.ToString (), SystemInformation.HorizontalScrollBarHeight.ToString (), SystemInformation.HorizontalScrollBarThumbWidth.ToString (), SystemInformation.IconSize.ToString (), SystemInformation.IconSpacingSize.ToString (), SystemInformation.KanjiWindowHeight.ToString (), SystemInformation.MaxWindowTrackSize. ToString (), SystemInformation.MenuButtonSize.ToString (), SystemInformation.MenuCheckSize.ToString (), SystemInformation.MenuHeight.ToString (), SystemInformation.MidEastEnabled.ToString (), SystemInformation.MinimumWindowSize.ToString ()};}}}}
using System; using System.Drawing; using System.Windows.Forms; namespace WindowsProgram {class SystemInforList: Form {readonly float cxCol; readonly int cySpace; [STAThread] static void Main (string [] args) {Application.Run (new SystemInforList ());} public SystemInforList () {Text = "System Information List"; BackColor = SystemColors.Window; ForeColor = SystemColors.WindowText; Graphics grfx = CreateGraphics (); SizeF sizef = grfx.MeasureString ( "", Font); cxCol = sizef.Width SysInfoString.MaxLableWidth (grfx, Font); grfx.Dispose (); cySpace = Font.Height; // pixels per line interval} protected override void OnPaint (PaintEventArgs e) {Graphics grs = e.Graphics ; Brush brush = new SolidBrush (ForeColor); int iCount = SysInfoString.Count; string [] astrLable = SysInfoString.lables; string [] astrValues = SysInfoString.values; for (int i = 0; i