FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   it's possible to create button to show password of installer? (https://fileforums.com/showthread.php?t=99201)

Fakhruddinmaruf_ 17-05-2017 07:26

it's possible to create button to show password of installer?
 
1 Attachment(s)
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.

Gupta 19-05-2017 06:30

Code:

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


All times are GMT -7. The time now is 22:48.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com