View Full Version : it's possible to create button to show password of installer?
Fakhruddinmaruf_
17-05-2017, 07:26
I would like to make new installer. The installer must be entered the password. I think i should make new button to show password but i don't know what codes i must add. Can anyone help me? i want to make new different installer. thanks.
Like this picture.
var
PasswordShowHideBtn: TNewButton; // shows or hide the text
procedure PasswordShowHideBtnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer); forward;
procedure PasswordShowHideBtnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer); forward;
procedure RedesignWizardForm;
begin
with WizardForm.DirEdit do
begin
PasswordChar := '*'; // By Default Text is Hidden
end;
{ PasswordShowHideBtn }
PasswordShowHideBtn := TNewButton.Create(WizardForm);
with PasswordShowHideBtn do
begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(296);
Top := ScaleY(152);
Width := ScaleX(121);
Height := ScaleY(33);
Caption := 'show';
OnMouseDown := @PasswordShowHideBtnMouseDown;
OnMouseUp := @PasswordShowHideBtnMouseUp;
end;
PasswordShowHideBtn.TabOrder := 5;
end;
procedure PasswordShowHideBtnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer);
begin
with WizardForm.DirEdit do
begin
PasswordChar := '*'; // Makes Text Hidden
end;
end;
procedure PasswordShowHideBtnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer);
begin
with WizardForm.DirEdit do
begin
PasswordChar := #0; // Shows Real Text
end;
end;
procedure InitializeWizard();
begin
RedesignWizardForm;
end;
Fakhruddinmaruf_
21-05-2017, 14:52
Thanks sir
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.