Смотрите видео ниже, чтобы узнать, как установить наш сайт в качестве веб-приложения на домашнем экране.
Примечание: Эта возможность может быть недоступна в некоторых браузерах.
[Setup]
AppName=My Program
AppVersion=1.5
;AppVerName=My Program 1.5
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl
[Files]
Source: Portal_1.bmp; DestDir: {tmp}
[Code]
var
MyExit: TSetupForm;
procedure MyExitMessage();
var
OkButton, CancelButton: TButton;
MyIcon: String;
begin
MyExit := CreateCustomForm();
with MyExit do
begin
color := clblack
Position := poScreenCenter;
ClientWidth := WizardForm.Width;
ClientHeight := WizardForm.Height div 2;
Caption := ExpandConstant(SetupMessage(msgExitSetupTitle));
MyIcon := ExpandConstant(AddBackSlash('{tmp}') + 'Portal_1.bmp');
if not FileExists(MyIcon) then
ExtractTemporaryFile(ExtractFileName(MyIcon));
with TBitmapImage.Create(MyExit) do
begin
Left := ScaleX(10);
Top := ScaleY(20);
Width := ScaleX(80);
Height := ScaleY(80);
Bitmap.LoadFromFile(MyIcon);
Parent := MyExit;
end;
with TNewStaticText.Create(MyExit) do
begin
Left := ScaleX(110);
Top := ScaleY(20);
Width := MyExit.Width - ScaleX(115);
Height := MyExit.Height div 2;
AutoSize := False;
WordWrap := True;
Caption := ExpandConstant(SetupMessage(msgExitSetupMessage));
Parent := MyExit;
Font.Name:='Comic Sans MS'
Font.Color:=ClWhite;
end;
CancelButton := TButton.Create(MyExit);
with CancelButton do
begin
Width := WizardForm.CancelButton.Width;
Height := WizardForm.CancelButton.Height;
Left := MyExit.Width - Width - ScaleX(15);
Top := MyExit.Height - Height * 2 - ScaleY(15);
Caption:='Назад';
ModalResult := mrCancel;
Parent := MyExit;
end;
OkButton := TButton.Create(MyExit);
with OkButton do
begin
Width := CancelButton.Width;
Height := CancelButton.Height;
Left := CancelButton.Left - Width - ScaleX(5);
Top := CancelButton.Top;
Caption:='Выйти';
ModalResult := mrOk;
Parent := MyExit;
end;
ActiveControl := CancelButton;
end;
end;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Confirm := False;
MyExitMessage();
if MyExit.ShowModal() = mrCancel then
Cancel := False;
end;
Спасибо!Esysex,
Код:[Setup] AppName=My Program AppVersion=1.5 ;AppVerName=My Program 1.5 DefaultDirName={pf}\My Program DefaultGroupName=My Program [Languages] Name: russian; MessagesFile: compiler:Languages\Russian.isl [Files] Source: Portal_1.bmp; DestDir: {tmp} [Code] var MyExit: TSetupForm; procedure MyExitMessage(); var OkButton, CancelButton: TButton; MyIcon: String; begin MyExit := CreateCustomForm(); with MyExit do begin color := clblack Position := poScreenCenter; ClientWidth := WizardForm.Width; ClientHeight := WizardForm.Height div 2; Caption := ExpandConstant(SetupMessage(msgExitSetupTitle)); MyIcon := ExpandConstant(AddBackSlash('{tmp}') + 'Portal_1.bmp'); if not FileExists(MyIcon) then ExtractTemporaryFile(ExtractFileName(MyIcon)); with TBitmapImage.Create(MyExit) do begin Left := ScaleX(10); Top := ScaleY(20); Width := ScaleX(80); Height := ScaleY(80); Bitmap.LoadFromFile(MyIcon); Parent := MyExit; end; with TNewStaticText.Create(MyExit) do begin Left := ScaleX(110); Top := ScaleY(20); Width := MyExit.Width - ScaleX(115); Height := MyExit.Height div 2; AutoSize := False; WordWrap := True; Caption := ExpandConstant(SetupMessage(msgExitSetupMessage)); Parent := MyExit; Font.Name:='Comic Sans MS' Font.Color:=ClWhite; end; CancelButton := TButton.Create(MyExit); with CancelButton do begin Width := WizardForm.CancelButton.Width; Height := WizardForm.CancelButton.Height; Left := MyExit.Width - Width - ScaleX(15); Top := MyExit.Height - Height * 2 - ScaleY(15); Caption:='Назад'; ModalResult := mrCancel; Parent := MyExit; end; OkButton := TButton.Create(MyExit); with OkButton do begin Width := CancelButton.Width; Height := CancelButton.Height; Left := CancelButton.Left - Width - ScaleX(5); Top := CancelButton.Top; Caption:='Выйти'; ModalResult := mrOk; Parent := MyExit; end; ActiveControl := CancelButton; end; end; procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean); begin Confirm := False; MyExitMessage(); if MyExit.ShowModal() = mrCancel then Cancel := False; end;