Yalsrof
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
Код:
var
AutoRun: TSetupForm;
ContinueInstall: boolean;
Ok: TLabel;
TextA: TLabel;
TextB: TLabel;
Logo: TLabel;
procedure LogoClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('', 'http://krinkels.org/showthread.php?p=18597#post18597', '', '', SW_SHOW, ewNoWait, ErrorCode);
end;
procedure OkClick(Sender: TObject);
begin
ContinueInstall:=True;
AutoRun.Close;
end;
function AutoRunExec: boolean;
begin
ContinueInstall:=False;
AutoRun := CreateCustomForm;
with AutoRun do begin
ClientWidth:=ScaleX(365);
ClientHeight:=ScaleY(220);
Position := poScreenCenter;
end;
Logo := TLabel.Create(CreateCustomForm);
with Logo do
begin
SetBounds(ScaleX(30), ScaleY(190), ScaleX(75), ScaleY(25));
Parent := AutoRun;
Caption := 'krinkels.org';
OnClick:=@LogoClick
Font.Color := $d77a02;
Font.Height := -16;
Font.Name := 'Tahoma';
Font.Style := [fsBold];
Cursor := crHand;
end;
Ok := TLabel.Create(CreateCustomForm);
with Ok do
begin
SetBounds(ScaleX(300), ScaleY(190), ScaleX(75), ScaleY(25));
Parent := AutoRun;
Caption := 'ok';
OnClick:=@OkClick
Font.Color := $d77a02;
Font.Height := -16;
Font.Name := 'Tahoma';
Font.Style := [fsBold];
Cursor := crHand;
end;
TextA := TLabel.Create(CreateCustomForm);
with TextA do
begin
Parent := AutoRun;
Caption := 'Свой текст!';
Font.Color := $d77a02;
Font.Height := -16;
Font.Name := 'Tahoma';
Font.Style := [fsBold];
ParentFont := False;
Left := ScaleX(135);
Top := ScaleY(0);
Width := ScaleX(100);
Height := ScaleY(20);
end;
TextB := TLabel.Create(CreateCustomForm);
with TextB do
begin
Parent := AutoRun;
Alignment := taCenter;
Caption := 'Свой текст!';
Font.Color := $d77a02;
Font.Height := -16;
Font.Name := 'Tahoma';
Font.Style := [fsBold];
ParentFont := False;
Left := ScaleX(0);
Top := ScaleY(20);
Width := ScaleX(370);
Height := ScaleY(170);
end;
AutoRun.ShowModal;
AutoRun.Free;
Result:=ContinueInstall;
end;
function InitializeSetup: Boolean;
begin
Result:=AutoRunExec;
end;
procedure DeinitializeSetup;
begin
if ContinueInstall then begin
end;
end;[/SPOILER]