Search code examples
settingssystemappearance

How to get the system settings that I can find in the Appearance dialog?


I need to get some system settings for example, font size and color for a standard dialog box? (I use C#) Thanks


Solution

  • The following classes have properties that will give you the information you are after:

    System.Drawing.SystemFonts
    System.Drawing.SystemColors
    System.Windows.Forms.SystemInformation
    

    In answer to the OPs comment:

    Font messageBoxFont = System.Drawing.SystemFonts.MessageBoxFont;