Style manipulation at runtime is done using the class methods of the TStyleManager class. Follow these steps to change the style of your VCL application at runtime:
- Create a brand new VCL application and add the Vcl.Themes and Vcl.Styles units to the main form's implementation uses section. These units are required to use VCL styles at runtime.
- Drop on the form a TListBox, two TButton, and a TOpenDialog. Leave the default component names.
- Go to Project | Appearance and select eight styles of your choice from the list. Leave the Default style as Windows.
- The TStyleManager.StyleNames property contains the names of all the available styles. In the FormCreate event handler, we have to load the already linked styles present in ...