home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue36 / frmcache / CachedForms.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1998-05-29  |  511 b   |  33 lines

  1. unit CachedForms;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
  7.  
  8. type
  9.   TCachedForm = class(TForm)
  10.   public
  11.     class function CreateForm: TCachedForm;
  12.     procedure FreeForm;
  13.   end;
  14.  
  15. implementation
  16.  
  17. uses
  18.   FormCaching;
  19.   
  20. {$R *.DFM}
  21.  
  22. class function TCachedForm.CreateForm: TCachedForm;
  23. begin
  24.   Result := TCachedForm (FormCache.CreateForm (Self));
  25. end;
  26.  
  27. procedure TCachedForm.FreeForm;
  28. begin
  29.   FormCache.FreeForm (Self);
  30. end;
  31.  
  32. end.
  33.