我希望用户在他/她能够查看表单之前登录...
它似乎不起作用。
有任何想法吗?
sLoginID := InputBox('Ink Spots','Please enter login ID:','');
sLoginPassword := InputBox('Ink Spots','Please enter password for ' + sLoginID,'');
if sLoginID <> 'user'
then
begin
ShowMessage('You shall not pass!');
Self.Close;
end
else
begin
sLoginPassword := InputBox('Ink Spots','Please enter password for ' + sLoginID,'');
if sLoginPassword <> 'pass'
then
begin
ShowMessage('You shall not pass!');
Self.Close;
end;
end
;