Table of Contents

TMS FNC App Lock — Guides

Idle-timeout locking

Enable automatic locking after user inactivity by setting ActiveOnIdle to True and specifying the timeout with IdleMinutes and IdleSeconds. The component monitors input events and fires Lock when the elapsed idle time exceeds the threshold.

{ Inside FormCreate: }
AppLock1.ActiveOnIdle := True;
AppLock1.IdleMinutes := 5;

Customizing the lock dialog

Use TTMSFNCAppLockDialogLabelSettings (exposed through Dialog) to change the caption and label text shown in the built-in password dialog:

AppLock1.Dialog.Caption := 'Application Locked';
AppLock1.Dialog.Password := 'Enter password to continue';

Custom password verification

Handle OnVerifyPassword to delegate password checking to your own logic, for example verifying against an encrypted store or an Active Directory query:

procedure TForm1.AppLock1OnVerifyPassword(Sender: TObject;
  const APassword: string; var AValid: Boolean);
begin
  AValid := MyAuthService.Verify(APassword);
end;

See also