AdvLockApp

TAdvLockApp1 is on the main form and I'm not using a DLL to call from

I'm using the VerifyPassword procedure as follows



procedure TFormMain.AdvLockApp1VerifyPassword(Sender: TObject; Password: string; var Valid: Boolean);

begin

AdvLockApp1.UserName := 'Tom';

//Returns T if AdvLockApp1.UserName & Password are found

//AdvLockApp1.UserName & Password are dialog (TAdvLockApp) variables

Valid := Find_A_ValidUser(AdvLockApp1.UserName, Password); //=AdvLockApp1.password

end;



Since the procedure "QueryUnlock(Sender: TObject; Var AllowUnlock: Boolean);"

fires prior to the VerifyPassword procedure {which is where the "password" var is populated}

and the IncorrectPassword(Sender: TObject); procedure isn't passed the var AdvLockApp1.password; is there a way to execute a block of code when an invalid password is entered and "unlock" the main form if a certain criteria is met in that block of code?

Thanks much

Unfortunately not, OnVerifyPassword is the final event and its return value decides whether an unlock can happen or not. So, I'd suggest to add any additional criteria in OnVerifyPassword.