Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6717699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:52:59+00:00 2026-05-26T08:52:59+00:00

PowerPoint 2010 comes with three default themes, silver, black and blue. Is it possible

  • 0

PowerPoint 2010 comes with three default themes, silver, black and blue. Is it possible to check which theme the user is currently using from code-behind?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:52:59+00:00Added an answer on May 26, 2026 at 8:52 am

    I use this code to setup colours for my interface depending on what theme is set.

    public static class LFTheme 
        {
            const int ThemeClassic = 0;
            const int ThemeBlue = 1;
            const int ThemeSilver = 2;
            const int ThemeBlack = 3;
    
            public static int Theme { get; set; }
            public static Color BackColor { get; set; }
            public static Color ForeColor { get; set; }
            public static Color ForeColorLight { get; set; }
            public static Color ForeColorDark { get; set; }
            public static Color TextColor { get; set; }
            public static System.Drawing.Font Font { get; set; }
    
            public static Excel.Application ExcelApp { get; set; }
            public static Double ExcelVersion { get; set; }
    
            static LFTheme()
            {
                InitLook();
            }
    
    
         public static void InitLook()
                {
                    const string OfficeCommonKey = @"Software\Microsoft\Office\{0:0.0}\Common";
                    const string OfficeThemeValueName = "Theme";
    
                    Theme = 0;
                    BackColor = System.Windows.Forms.Control.DefaultBackColor;
                    ForeColor = System.Drawing.SystemColors.Control;
                    ForeColorLight = System.Drawing.SystemColors.ControlLight;
                    ForeColorDark = System.Drawing.SystemColors.ControlDark;
                    TextColor = System.Drawing.SystemColors.ControlText;
                    Font = System.Windows.Forms.Control.DefaultFont;
    
                    if (ExcelVersion<12.0)
                        return;
    
                    using (RegistryKey key = Registry.CurrentUser.OpenSubKey(String.Format(OfficeCommonKey, ExcelVersion), false))
                    {
                        try
                        {
                            Theme = (int)key.GetValue(OfficeThemeValueName);
                        }
                        catch (Exception ex)
                        {
                            Theme = ThemeClassic;
                            if (ExcelVersion >= 12.0)
                            {
                                Theme = ThemeBlue;
                            }
                        }
    
                        switch (Theme)
                        {
                            case ThemeBlue:
                                BackColor = Color.FromArgb(255, 213, 228, 242);
                                ForeColor = Color.FromArgb(255, 107, 160, 209);
                                ForeColorLight = Color.FromArgb(255, 185, 210, 234);
                                ForeColorDark = Color.FromArgb(255, 87, 149, 204);
                                TextColor = Color.FromArgb(255, 50, 108, 160);
                                Font = new System.Drawing.Font("Segoe UI", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
                                break;
    
                            case ThemeSilver:
                                BackColor = Color.FromArgb(255, 232, 236, 243);
                                ForeColor = Color.FromArgb(255, 158, 162, 161);
                                ForeColorLight = Color.FromArgb(255, 200, 206, 205);
                                ForeColorDark = Color.FromArgb(255, 128, 133, 131);
                                TextColor = Color.FromArgb(255, 116, 118, 123);
                                Font = new System.Drawing.Font("Segoe UI", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
                                break;
    
                            case ThemeBlack:
                                BackColor = Color.FromArgb(255, 83, 83, 83);
                                ForeColor = Color.FromArgb(255, 168, 170, 170);
                                ForeColorLight = Color.FromArgb(255, 188, 190, 190);
                                ForeColorDark = Color.FromArgb(255, 148, 150, 150);
                                TextColor = Color.FromArgb(255, 224, 226, 226);
                                Font = new System.Drawing.Font("Segoe UI", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
                                break;
    
                            default:                    
                                break;
                        }
                    }
                }
    
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to start a slideshow from a Powerpoint 2010 add-in?
I am automating PowerPoint 2010 using VSTO and I want to check if the
I am currently trying to create a Powerpoint (2010) SLide Master with VBA and
Can Silverlight apps be embedded into PowerPoint? We're currently weighing the pros and cons
Is there a way to programmatically create PowerPoint presentations? If possible, I'd like to
While it is possible to generate PowerPoint presentations automatically using Office Automation , this
I'm writing a PowerPoint 2010 AddIn. In a nutshell this is what I do:
I am working with Delphi(2010), but I'm new with PowerPoint(2010) I've found two codes
I have created a bunch of slides in Powerpoint 2010, and all attempts to
I am porting some PowerPoint VBA macros into C# inside a VSTO add-on which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.