A ver si esto te ayuda...
Código Delphi
[-]
function TForm3.TryInputQuery:Boolean;
var
respuesta: Boolean;
Text, Values: String;
begin
Values:='xr8mt5xr';
Text :=Chr(30)+'Introduce la contraseña maestra.';
while True do
begin
Result := InputQuery('Cajón de claves.', Text, Values);
if not Result then
Exit;
if Values='xr8mt5xr' then
Exit;
end;
end;
Tu la complementas...Saludos cordiales