home *** CD-ROM | disk | FTP | other *** search
/ PC Format Collection 48 / SENT14D.ISO / tech / delphi / disk15 / fddelphi.pak / USEPASS.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1995-08-24  |  630 b   |  38 lines

  1. unit UsePass;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, PassForm, StdCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Button1: TButton;
  12.     procedure Button1Click(Sender: TObject);
  13.   private
  14.     { Private declarations }
  15.   public
  16.     { Public declarations }
  17.   end;
  18.  
  19. var
  20.   Form1: TForm1;
  21.  
  22.  
  23. implementation
  24.  
  25. {$R *.DFM}
  26.  
  27. function GetPassword(APassword: Pchar): WordBool; far;
  28. external 'PASSWORD';
  29.  
  30. procedure TForm1.Button1Click(Sender: TObject);
  31. begin
  32.   if GetPassword('PASSWORD') then
  33.     Color := clGreen
  34.   else Color := clRed;
  35. end;
  36.  
  37. end.
  38.