home *** CD-ROM | disk | FTP | other *** search
- unit Dllform;
-
- interface
-
- uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls,
- Buttons, SysUtils, StdCtrls;
-
- type
- TPasswordForm = class(TForm)
- Edit1: TEdit;
- Label1: TLabel;
- BitBtn2: TBitBtn;
- BitBtn1: TBitBtn;
- 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('Invalid Password', mtWarning, [mbOK], 0)
- else
- Result := True;
- finally
- PasswordForm.Free;
- end;
- end;
-
- end.
-