Search code examples
inno-setuppascalscript

How to remove white border from right and down part instead having BorderStyle := bsNone in Inno Setup?


I have been trying making a border-less movable Inno Setup and figured how to make it movable and border-less but there are still border at the right and down part.

First my code was BorderStyle := bsDialog.

I changed to BorderStyle := bsNone to make the setup border-less.


Solution

  • Remember a client size of the window before you change the BorderStyle and restore the client size afterwards:

    procedure InitializeWizard();
    var
      ClientWidth: Integer;
      ClientHeight: Integer;
    begin
      ClientWidth := WizardForm.ClientWidth;
      ClientHeight := WizardForm.ClientHeight;
    
      WizardForm.BorderStyle := bsNone;
    
      WizardForm.ClientWidth := ClientWidth;
      WizardForm.ClientHeight := ClientHeight;
    end;
    

    Borderless window