InstallationWay
Новичок
Hi Friends, is there any way to create an invisible button (transparent button) in inno setup (which can accept events like keypress, mouse hover etc)?
Вложения
-
53 KB Просмотры: 20
No, because the source code of the component is not available. There are no other options.is there any way to remove it also?
is there any way implementing such a hidden area with a TLabel? if yes could you please provide a sample?
[Setup]
AppName=My Program
AppVersion=1.5
CreateAppDir=no
OutputDir=userdocs:Inno Setup Examples Output
PrivilegesRequired=lowest
[Code]
procedure LabelOnClick(Sender: TObject);
begin
MsgBox('You found the Label!', mbInformation, mb_Ok);
end;
procedure CreateTheWizardPages;
var
Page: TWizardPage;
begin
{ TLabel }
Page := CreateCustomPage(wpWelcome, 'Custom wizard page controls', 'TButton and others');
with TLabel.Create(Page) do
begin
Parent := Page.Surface;
Anchors := [akLeft, akTop];
Left := ScaleX(14);
Top := ScaleY(14);
Caption := 'Simple TLabel';
end;
with TLabel.Create(Page) do
begin
Parent := Page.Surface;
Anchors := [akLeft, akTop];
Left := ScaleX(14);
Top := ScaleY(100);
Font.Color := clBlue;
Caption := 'Hidden TLabel (Find&&Click) --->';
end;
with TLabel.Create(Page) do
begin
Parent := Page.Surface;
Anchors := [akLeft, akTop];
Left := ScaleX(200);
Top := ScaleY(80);
Font.Size := -36; // <-- size for hidden region
Caption := ' '; // <-- text with only Spaces for hidden region
OnClick := @LabelOnClick;
end;
end;
procedure InitializeWizard();
begin
{ Custom wizard page }
CreateTheWizardPages;
{ Custom beveled label }
WizardForm.BeveledLabel.Caption := ' Label ';
end;
{ Changed current Page }
procedure CurPageChanged(CurPageID: Integer);
begin
if PageIndexFromID(CurPageID) > PageIndexFromID(wpWelcome) then begin
WizardForm.NextButton.Hide;
WizardForm.CancelButton.Caption := 'Close';
end;
end;
{ Disable confirm cancel }
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Confirm := False;
end;
In the example above, just add a panel (TPanel) and place this TLabel on it.Is there any way to see label bounds (rectangle area with border) for test purposes?
Maybe you have a virus on your system?Why your setups will detect as virus?