home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue46 / packages / FormInheritancePackage / InheritedFormU.pas < prev   
Encoding:
Pascal/Delphi Source File  |  1999-04-22  |  722 b   |  37 lines

  1. unit InheritedFormU;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   BaseFormU, ExtCtrls, StdCtrls;
  8.  
  9. type
  10.   TInheritedForm = class(TBaseForm)
  11.     BtnDoSomething: TButton;
  12.     procedure BtnDoSomethingClick(Sender: TObject);
  13.   private
  14.     { Private declarations }
  15.   public
  16.     { Public declarations }
  17.   end;
  18.  
  19. var
  20.   InheritedForm: TInheritedForm;
  21.  
  22. implementation
  23.  
  24. {$R *.DFM}
  25.  
  26. procedure TInheritedForm.BtnDoSomethingClick(Sender: TObject);
  27. begin
  28.   inherited;
  29.   ShowMessage('Hey! This is an inherited from, installed by a custom package')
  30. end;
  31.  
  32. initialization
  33.   BaseFormClass := TInheritedForm
  34. finalization
  35.   BaseFormClass := TBaseForm;
  36. end.
  37.