I can not follow you with the msgbox, try other solutions like:
Code:
#Define Skin "setup.cjstyles"
[Setup]
AppName=InfoForm
AppVerName=InfoForm
CreateAppDir=no
[Files]
#ifdef Skin
Source: Files\ISSkin\{#Skin}; DestDir: "{app}"; Attribs: hidden system; Flags: ignoreversion;
Source: Files\ISSkin\ISSkin.dll; DestDir: "{app}"; Attribs: hidden system; Flags: ignoreversion;
#endif
[Languages]
Name: eng; MessagesFile: Languages\English.isl
[Code ]
var
InfoForm: TSetupForm;
InfoBtn: TButton;
#ifdef Skin
procedure LoadSkin(lpszPath: PAnsiChar; lpszIniFileName: PAnsiChar); external 'LoadSkin@{tmp}\isskin.dll stdcall delayload';
procedure UnloadSkin; external 'UnloadSkin@{tmp}\isskin.dll stdcall delayload';
function ShowWindow(hWnd: Integer; uType: Integer): Integer; external '[email protected] stdcall';
#endif
procedure CloseForm(Sender: TObject);
begin
InfoForm.Close;
end;
procedure FormOnClick(Sender: TObject);
var Ok: TButton;
begin
InfoForm := CreateCustomForm();
try
with InfoForm do
begin
ClientWidth := ScaleX(390);
ClientHeight := ScaleY(300);
BorderIcons := [];
Caption := SetupMessage(msgInformationTitle);
CenterInsideControl(WizardForm, False);
end;
Ok := TButton.Create(InfoForm);
with Ok do
begin
Parent := InfoForm;
SetBounds(ScaleX(300), ScaleY(265), ScaleX(75), ScaleY(23));
Caption := SetupMessage(msgButtonOk);
OnClick:=@CloseForm;
end;
with TLabel.Create(InfoForm) do
begin
Parent := InfoForm;
Font.Size := 100;
Font.Style := [fsBold];
Font.Name:='Arial';
Font.Color := $FFFFFF;
Caption:='TEST';
end;
finally
end;
InfoForm.ShowModal;
end;
procedure InitializeWizard();
begin
with WizardForm do begin
NextButton.SetBounds(0,0,0,0);
BackButton.SetBounds(0,0,0,0);
InfoBtn := TButton.Create(WizardForm);
InfoBtn.Caption := 'Info';
InfoBtn.Parent := WizardForm;
InfoBtn.SetBounds(5,327,75,23);
InfoBtn.OnClick := @FormOnClick;
end;
end;
function InitializeSetup(): Boolean;
begin
#ifdef Skin
ExtractTemporaryFile('isskin.dll');
ExtractTemporaryFile('{#Skin}');
LoadSkin(ExpandConstant('{tmp}\{#Skin}'), '');
#endif
Result := True;
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
#ifdef Skin
FileCopy(ExpandConstant('{tmp}\ISSkin.dll'),ExpandConstant('{app}\Uninstall\ISSkin.dll'),False);
FileCopy(ExpandConstant('{tmp}\{#Skin}'),ExpandConstant('{app}\Uninstall\{#Skin}'),False);
#endif
end;
procedure DeinitializeSetup();
begin
#ifdef Skin
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')),0);
UnloadSkin;
#endif
end;