unit PassDlg;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, ComCtrls, Menus;

type
  TDlgPass = class(TForm)
    Panel2: TPanel;
    LCaption: TLabel;
    Image1: TImage;
    Panel3: TPanel;
    bOk: TButton;
    bCancel: TButton;
    ePass: TEdit;
    procedure bOkClick(Sender: TObject);
    procedure bCancelClick(Sender: TObject);
  public
  private
  end;

function PasswordDialog(var Password: string): boolean;

implementation

{$R *.dfm}

function PasswordDialog(var Password: string): boolean;
var
  D: TDlgPass;
begin
   result := false;
   Password := '';
   Application.CreateForm(TDlgPass,D);
   try
     if D.ShowModal = mrOk then
     begin
       Password := D.EPass.Text;
       result := true;
     end;
   finally
     D.Free;
   end;
end;


procedure TDlgPass.bCancelClick(Sender: TObject);
begin
  close;
end;

procedure TDlgPass.bOkClick(Sender: TObject);
begin
   close;
   Modalresult := mrOk;
end;

end.
