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 7719945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:32:29+00:00 2026-06-01T03:32:29+00:00

Is there a good VCL Styles tutorial where we see how to dynamically (in

  • 0

Is there a good VCL Styles tutorial where we see how to dynamically (in run time) load/change the style ?

This should work with Delphi XE2 and up, since XE2 is the first version with VCL Styles.

  • 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-06-01T03:32:31+00:00Added an answer on June 1, 2026 at 3:32 am

    I’m adding an answer because local information is often preferred to just links.

    Here’s the key facts you need to know before you start:

    1. Many VCL controls have color properties, but those properties are going to get ignored when styles are on, and the default “common controls” like Button are going to get drawn by Delphi itself, instead of using the XP or Windows 2000 style that “comes with windows”.

    2. Somehow, deep within your application, VCL styles puts hooks in that take over painting your controls. Everything that it can handle, will be drawn using a “skin” on top of the regular controls. Many people call this “skinning the vcl”, and prior to VCL styles, you might have found a third party skin system. Now it’s built in.

    3. Anything that is not hooked, will still get the regular style. So most third party controls, and some bits of the VCL will not be themed. Don’t expect perfect instant results. Also, you might sometimes see some momentary flicker or glitches as a result of skinning, that’s to be expected. Add loading of styles at runtime, and the end-quality of your result is anybody’s guess. You can’t necessarily guarantee that the style which is loaded at runtime, will contain everything you might want it to contain. Nor can you guarantee that with one you statically include in your app, but at least the ones you statically include could be verified by your QA team (which might be you).

    And here’s the simplest steps to get started: Really only step #2 through #4 are essential.

    1. Click File -> New -> VCL Forms project.

    2. Right click on the project options in the Project manager pane, and click properties. Navigate to Application -> Appearance

    3. Click on a custom style to turn it on. (Amakrits is the first in my list, so I’ll click that).

    4. Click on the Default Style combobox and change it to something other than default.

    5. Put something on your form so it’s not empty. (A button, a listbox, etc).

    6. Run your app.

    enter image description here

    Now, advanced stuff: Change your style at runtime:

    I use this button click and formcreate to do that:

    Add fdefaultStyleName:String; to private section of your form.

    Make sure Vcl.Themes is in your uses clause.

    procedure TForm1.Button1Click(Sender: TObject);
    begin
     if Assigned(TStyleManager.ActiveStyle) and (TStyleManager.ActiveStyle.Name<>'Windows') then begin
       TStyleManager.TrySetStyle('Windows');
     end else begin
       TStyleManager.TrySetStyle(fdefaultStyleName); // whatever was in the project settings.
     end;
    
    end;
    
    procedure TForm1.FormCreate(Sender: TObject);
    begin
    if Assigned(TStyleManager.ActiveStyle) then
      fdefaultStyleName := TStyleManager.ActiveStyle.Name;
    
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a good ruby gem for a WYSIWYG editor that will easily work
Is there a good way to see what format an image is, without having
There's this Transformable data type for attributes. What is it good for? Are there
Hi is there good tutorial about using Fluent Nhibernate in asp.net/winforms application ? I
Are there good reasons why it's a better practice to have only one return
Are there good efficiency savings using Sql Server 2005 over Sql Server 2000? Or
Is there good example code or a test project for explaining the Model–view–presenter (MVP)
What are the tensions between multithreading and exception-safety in C++? Are there good guidelines
Is there any good way to deal with the class renaming refactor from Resharper
Is there a good way for displaying unicode text in opengl under Windows? For

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.