Colors – Modify the color scheme of INNO SETUP INSTALLER

I have been playing Inno Setup 5.3.6; try to customize the color of the installer. Mainly the banner that appears in the head of the installer. But so far I haven’t found a convenient Method.

After reading the document, I found the BackColor, BackColor2, BackColorDirection and BackSolid parameters. But giving them different values ​​has not given me any visual changes.

< p>Simple example of what I am trying to do

[Setup]
AppName=My Program
AppVerName=My Program version 1.4
DefaultDirName= {pf}\My Program
DefaultGroupName=My Program

BackColor=$E6B13A
BackColor2=$E5B13A
BackSolid=no
BackColorDirection=lefttoright

What I want to know is, does anyone know what colors are actually modified by BackColor and BackColor2? If there is no easy way to change the color; is there a way to use the [Code] section to programmatically modify the color gradient of the upper banner?

These four parameters are described in the Cosmetic section of the [Setup] section of the Inno Setup help. They can achieve your desired effect, but they cannot be used to set the gradient in the upper area of ​​the wizard, but are used for the background window that was used a few years ago. This is considered a legacy, but it can be enabled through settings

[Setup]
...
WindowVisible=yes

(The default value is no). You can try to use it to view its It works, but IMO you should not enable this feature for your installation unless you want them to look outdated.

As for the top area of ​​the wizard: it does not mean that there is a gradient. If you use something like Tools such as Spy to check the window hierarchy of the wizard, or open the Wizard.dfm.txt text file from the Inno installation source, you will find that the color of the window of the TPanel class is set to the default window color (if you know Delphi, it is clWindow, Or use the result of calling GetSysColor() with the COLOR_WINDOW constant). This is a solid color, you can easily change it by adding it to the [code] section:

procedure InitializeWizard() ;
begin
WizardForm.MainPanel.Color := clYellow;
end;

I don’t think it is possible to draw gradients on this panel with the current Inno Setup version, because The panel itself does not have a canvas to draw, and the TPaintBox class may be created in the correct position and used to draw gradients is not available (see the list of classes in the "Supported Class Reference" section of the document).

I have been playing Inno Setup 5.3.6; trying to customize the color of the installer. Mainly the banner that appears on the head of the installer. But so far I haven't found a convenient way.

After reading the document, I found the BackColor, BackColor2, BackColorDirection and BackSolid parameters. But giving them different values ​​has not given me any visual changes.

What I am trying to do Simple example

[Setup]
AppName=My Program
AppVerName=My Program version 1.4
DefaultDirName={pf}\My Program
DefaultGroupName=My Program

BackColor=$E6B13A
BackColor2=$E5B13A
BackSolid=no
BackColorDirection=lefttoright

What I want to know is, does anyone know what colors are actually modified by BackColor and BackColor2? If there is no easy way to change the color; is there a way to use the [Code] section to programmatically modify the color gradient of the upper banner?

These four parameters are described in the Cosmetic section of the [Setup] part of the Inno Setup help. They can achieve your expected results, but they cannot be used The gradient in the upper area of ​​the setup wizard is used for the background window that was used a few years ago. This is considered to be legacy, but it can be enabled by setting

[Setup ]
...
WindowVisible=yes

(The default value is no). You can try to use it to see how it is running, but IMO you should not install it for you Enable this feature unless you want them to look outdated.

As for the top area of ​​the wizard: it does not mean that there is a gradient. If you use a tool like Spy to check the window hierarchy of the wizard, Or open the Wizard.dfm.txt text file from the Inno installation source, you will find that the color of the window of the TPanel class is set to the default window color (if you know Delphi, it is clWindow, or the result of calling GetSysColor() with the COLOR_WINDOW constant). This is a solid color, you can easily change it by adding it to the [Code] section:

procedure InitializeWizard();
begin
WizardForm. MainPanel.Color := clYellow;
end;

I don't think that using the current Inno Setup version can draw gradients on this panel, because the panel itself does not have a canvas to draw, and the TPaintBox class may Created in the correct position and used to draw the gradient is not available (please refer to the class list in the "Supported Class Reference" section of the document).

Leave a Comment

Your email address will not be published.