Hell_Dog2011
[more=пример][Setup]
AppName=Launcher
AppVersion=Launcher
CreateAppDir=no
OutputBaseFilename=Launcher
OutputDir=.
[Code]
const
BM_CLICK = $00F5;
var
ExitButton, RunButton1, RunButton2: TNewButton;
ResultCode: Integer;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Confirm:=False
Cancel:=True
end;
procedure ExitButtonClick(Sender: TObject);
var
CurPageID: Integer;
begin
PostMessage(WizardForm.CancelButton.Handle, BM_CLICK, 0, 0);
end;
procedure RunButton1Click(Sender: TObject);
var
CurPageID: Integer;
begin
Exec(ExpandConstant('{src}\Run1.exe'),'','',SW_SHOW,ewNoWait,ResultCode)
PostMessage(WizardForm.CancelButton.Handle, BM_CLICK, 0, 0);
end;
procedure RunButton2Click(Sender: TObject);
var
CurPageID: Integer;
begin
Exec(ExpandConstant('{src}\Run2.exe'),'','',SW_SHOW,ewNoWait,ResultCode)
PostMessage(WizardForm.CancelButton.Handle, BM_CLICK, 0, 0);
end;
procedure InitializeWizard();
begin
with WizardForm do begin
BorderStyle:=bsNone //(bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin)
Bevel.Hide;
InnerNotebook.Hide;
OuterNotebook.Hide;
SetBounds(ScaleX(0), ScaleY(0), ScaleX(170), ScaleY(70));
Position:=poScreenCenter;
Color := clBtnShadow;
end;
RunButton1 := TNewButton.Create(WizardForm);
with RunButton1 do
begin
Name := 'RunButton1';
Parent := WizardForm;
Left := ScaleX(10);
Top := ScaleY(10);
Width := ScaleX(125);
Height := ScaleY(22);
Caption := 'Запустить мод-1';
Font.Color := clWindowText;
Font.Height := -11;
Font.Name := 'Arial Black';
Font.Style := [fsBold];
ParentFont := False;
OnClick := @RunButton1Click;
end;
RunButton2 := TNewButton.Create(WizardForm);
with RunButton2 do
begin
Name := 'RunButton2';
Parent := WizardForm;
Left := ScaleX(10);
Top := ScaleY(40);
Width := ScaleX(125);
Height := ScaleY(22);
Caption := 'Запустить мод-1';
Font.Color := clWindowText;
Font.Height := -11;
Font.Name := 'Arial Black';
Font.Style := [fsBold];
ParentFont := False;
OnClick := @RunButton2Click;
end;
ExitButton := TNewButton.Create(WizardForm);
with ExitButton do
begin
Name := 'ExitButton';
Parent := WizardForm;
Left := ScaleX(140);
Top := ScaleY(10);
Width := ScaleX(22);
Height := ScaleY(22);
OnClick := @ExitButtonClick;
Caption := 'X';
Font.Color := clWindowText;
Font.Height := -13;
Font.Name := 'Arial Black';
Font.Style := [fsBold];
ParentFont := False;
end;
end;[/more]
[more=пример][Setup]
AppName=Launcher
AppVersion=Launcher
CreateAppDir=no
OutputBaseFilename=Launcher
OutputDir=.
[Code]
const
BM_CLICK = $00F5;
var
ExitButton, RunButton1, RunButton2: TNewButton;
ResultCode: Integer;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Confirm:=False
Cancel:=True
end;
procedure ExitButtonClick(Sender: TObject);
var
CurPageID: Integer;
begin
PostMessage(WizardForm.CancelButton.Handle, BM_CLICK, 0, 0);
end;
procedure RunButton1Click(Sender: TObject);
var
CurPageID: Integer;
begin
Exec(ExpandConstant('{src}\Run1.exe'),'','',SW_SHOW,ewNoWait,ResultCode)
PostMessage(WizardForm.CancelButton.Handle, BM_CLICK, 0, 0);
end;
procedure RunButton2Click(Sender: TObject);
var
CurPageID: Integer;
begin
Exec(ExpandConstant('{src}\Run2.exe'),'','',SW_SHOW,ewNoWait,ResultCode)
PostMessage(WizardForm.CancelButton.Handle, BM_CLICK, 0, 0);
end;
procedure InitializeWizard();
begin
with WizardForm do begin
BorderStyle:=bsNone //(bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin)
Bevel.Hide;
InnerNotebook.Hide;
OuterNotebook.Hide;
SetBounds(ScaleX(0), ScaleY(0), ScaleX(170), ScaleY(70));
Position:=poScreenCenter;
Color := clBtnShadow;
end;
RunButton1 := TNewButton.Create(WizardForm);
with RunButton1 do
begin
Name := 'RunButton1';
Parent := WizardForm;
Left := ScaleX(10);
Top := ScaleY(10);
Width := ScaleX(125);
Height := ScaleY(22);
Caption := 'Запустить мод-1';
Font.Color := clWindowText;
Font.Height := -11;
Font.Name := 'Arial Black';
Font.Style := [fsBold];
ParentFont := False;
OnClick := @RunButton1Click;
end;
RunButton2 := TNewButton.Create(WizardForm);
with RunButton2 do
begin
Name := 'RunButton2';
Parent := WizardForm;
Left := ScaleX(10);
Top := ScaleY(40);
Width := ScaleX(125);
Height := ScaleY(22);
Caption := 'Запустить мод-1';
Font.Color := clWindowText;
Font.Height := -11;
Font.Name := 'Arial Black';
Font.Style := [fsBold];
ParentFont := False;
OnClick := @RunButton2Click;
end;
ExitButton := TNewButton.Create(WizardForm);
with ExitButton do
begin
Name := 'ExitButton';
Parent := WizardForm;
Left := ScaleX(140);
Top := ScaleY(10);
Width := ScaleX(22);
Height := ScaleY(22);
OnClick := @ExitButtonClick;
Caption := 'X';
Font.Color := clWindowText;
Font.Height := -13;
Font.Name := 'Arial Black';
Font.Style := [fsBold];
ParentFont := False;
end;
end;[/more]