home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE02 / TPACK / TPACK.ZIP / TOOLPROC.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-06-01  |  1.8 KB  |  61 lines

  1. {------------------------------------------------------------------------------}
  2. {UNREGISTERED VERSION (6/1/95) PLEASE REDISTRIBUTE IN tPACK.ZIP!
  3.  This revision does not contain everything, nor are the exciting
  4.  DataSetReporter and ExtendedMenu[Item] components included.
  5.  Use SWREG#5906 to receive these, icons and a help file for $130.
  6.  You must register when using this code in a business application!
  7.  You'll receive a license to use this code in up to 50 copies of
  8.  any app you write. In turn you will get responsive e-mail
  9.  tech support and enhancements till I run out of registrations
  10.  or suggestions. Meanwhile.. enjoy the code. Bye! I'll make more.
  11.  {(C)'1995 Michael/Ax-Systems, 71560,1754@Compuserve.com}
  12. {------------------------------------------------------------------------------}
  13.  
  14. unit ToolProc;
  15. {application wide tool procedures}
  16. {used to link to dll's or use/link objects into the current project}
  17.  
  18. {the idea is to literally centralize calls for well defined stuff here.
  19. this makes it easier to use bound and unbound code by a compiler switch.}
  20.  
  21. interface
  22.  
  23. { Put this comment at the beginning of a line to use the DLL instead: $DEFINE USEDLL}
  24. {xx $DEFINE USEDLL}
  25. { Alternatively select Project Options|Directories/Conditionals and specify USEDLL there}
  26.  
  27. {There is a tiny dpr for tpDLL included.}
  28.  
  29. {$IFDEF USEDLL}
  30. uses
  31.   Forms, Shells;
  32.  
  33. {$ELSE}
  34. uses
  35.   Forms, TpAbout;
  36. {$ENDIF}
  37.  
  38. procedure AboutBox;
  39.  
  40. implementation
  41.  
  42. procedure AboutBox;
  43. begin
  44.   {$IFDEF USEDLL}
  45.     with TDLLShell.Create(Application) do try
  46.       Run('tpDLL','AboutBox');
  47.     finally
  48.       Free; {finally free == delphi !}
  49.       end
  50.   {$ELSE} {use the same code as the invocation in the dll.}
  51.     With TtPackAboutBox.Create(Application) do try
  52.       Execute;
  53.     finally
  54.       Free;
  55.       end;
  56.   {$ENDIF}
  57. end;
  58.  
  59.  
  60. end.
  61.