type
Tpasswordform = class(TForm)
Edit1: TEdit;
Button1: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
function GetPassword(Password:string):Boolean;export;
implementation
uses Dialogs;
{$R *.DFM}
function GetPassword(Password:string):Boolean;
var
PasswordForm:TPasswordForm;
begin
Result:=False;
PasswordForm:=TPasswordForm.Create(Application);
try
with PasswordForm do
if ShowModal=mrOK then
if UpperCase(Edit1.Text)<> UpperCase(Password)then
MessageDlg('InvalidPassword',mtWarning,[mbOK],0)
else
Result:=True;
finally
PasswordForm.Free;
end;
end;