home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 March / pcp161b.iso / handson / archive / Issue157 / delphi / test / testunit.pas < prev   
Encoding:
Pascal/Delphi Source File  |  1999-07-09  |  633 b   |  38 lines

  1. unit testunit;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Button1: TButton;
  12.     Button2: TButton;
  13.     procedure FormCreate(Sender: TObject);
  14.   private
  15.     { Private declarations }
  16.   public
  17.     { Public declarations }
  18.     procedure ShowHint(Sender: TObject);
  19.   end;
  20.  
  21. var
  22.   Form1: TForm1;
  23.  
  24. implementation
  25.  
  26. {$R *.DFM}
  27. procedure TForm1.ShowHint(Sender: TObject);
  28. begin
  29.    Caption := Application.Hint;
  30. end;
  31.  
  32. procedure TForm1.FormCreate(Sender: TObject);
  33. begin
  34.   Application.OnHint := ShowHint;
  35. end;
  36.  
  37. end.
  38.