home *** CD-ROM | disk | FTP | other *** search
/ PC Expert 29 / Pce29cd.iso / RUNIMAGE / DELPHI40 / BIN / DPHIDE40.BPL / 0 / RCDATA / PASCRTRS < prev    next >
Text File  |  1998-06-16  |  8KB  |  449 lines

  1. unit %s;
  2.  
  3. interface
  4.  
  5. implementation
  6.  
  7. end.
  8. |unit %s;
  9.  
  10. interface
  11.  
  12. uses
  13.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
  14.  
  15. type
  16.   T%s = class(T%s)
  17.   private
  18.     { Private declarations }
  19.   public
  20.     { Public declarations }
  21.   end;
  22.  
  23. var
  24.   %1:s: T%1:s;
  25.  
  26. implementation
  27.  
  28. {$R *.DFM}
  29.  
  30. end.
  31. |unit %s;
  32.  
  33. interface
  34.  
  35. uses
  36.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
  37.  
  38. type
  39.   %s = class(%s)
  40.   private
  41.     { Private declarations }
  42.   protected
  43.     { Protected declarations }
  44.   public
  45.     { Public declarations }
  46.   published
  47.     { Published declarations }
  48.   end;
  49.  
  50. procedure Register;
  51.  
  52. implementation
  53.  
  54. procedure Register;
  55. begin
  56.   RegisterComponents('%s', [%1:s]);
  57. end;
  58.  
  59. end.
  60. |unit %0:s;
  61.  
  62. interface
  63.  
  64. uses
  65.   ComObj, ActiveX, %3:s;
  66.  
  67. type
  68.   T%1:s = class(TAutoObject, %5:s)
  69.   %6:s
  70.   end;
  71.  
  72. implementation
  73.  
  74. uses ComServ;%7:s
  75.  
  76. initialization
  77.   TAutoObjectFactory.Create(ComServer, T%1:s, Class_%1:s,
  78.     %2:s, %4:s);
  79. end.
  80. |unit %0:s;
  81.  
  82. interface
  83.  
  84. uses
  85.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  86.   ComServ, ComObj, VCLCom, StdVcl, BdeProv, DataBkr, DBClient, %3:s;
  87.  
  88. type
  89.   T%1:s = class(TRemoteDataModule, I%1:s)
  90.   private
  91.     { Private declarations }
  92.   public
  93.     { Public declarations }
  94.   end;
  95.  
  96. var
  97.   %1:s: T%1:s;
  98.  
  99. implementation
  100.  
  101. {$R *.DFM}
  102.  
  103. initialization
  104.   TComponentFactory.Create(ComServer, T%1:s,
  105.     Class_%1:s, %2:s, %4:s);
  106. end.
  107. |unit %0:s;
  108.  
  109. interface
  110.  
  111. uses
  112.   Classes;
  113.  
  114. type
  115.   %1:s = class(TThread)
  116.   private
  117.     { Private declarations }
  118.   protected
  119.     procedure Execute; override;
  120.   end;
  121.  
  122. implementation
  123.  
  124. { Important: Methods and properties of objects in VCL can only be used in a
  125.   method called using Synchronize, for example,
  126.  
  127.       Synchronize(UpdateCaption);
  128.  
  129.   and UpdateCaption could look like,
  130.  
  131.     procedure %1:s.UpdateCaption;
  132.     begin
  133.       Form1.Caption := 'Updated in a thread';
  134.     end; }
  135.  
  136. { %1:s }
  137.  
  138. procedure %1:s.Execute;
  139. begin
  140.   { Place thread code here }
  141. end;
  142.  
  143. end.
  144. |program %s;
  145.  
  146. uses
  147.   Forms;
  148.  
  149. {$R *.RES}
  150.  
  151. begin
  152.   Application.Initialize;
  153.   Application.Run;
  154. end.
  155. |library |;
  156.  
  157. uses
  158.   ShareMem,
  159. |  LibMain;
  160.  
  161. |
  162. exports
  163.   InitLibrary name LibrarySignature;
  164.  
  165. begin
  166. |end.
  167. |library %s;
  168.  
  169. { Important note about DLL memory management: ShareMem must be the
  170.   first unit in your library's USES clause AND your project's (select
  171.   Project-View Source) USES clause if your DLL exports any procedures or
  172.   functions that pass strings as parameters or function results. This
  173.   applies to all strings passed to and from your DLL--even those that
  174.   are nested in records and classes. ShareMem is the interface unit to
  175.   the BORLNDMM.DLL shared memory manager, which must be deployed along
  176.   with your DLL. To avoid using BORLNDMM.DLL, pass string information
  177.   using PChar or ShortString parameters. }
  178.  
  179. uses
  180.   SysUtils,
  181.   Classes;
  182.  
  183. begin
  184. end.
  185. |package %s;
  186.  
  187. end.
  188. |package |;
  189.  
  190. |{$DESCRIPTION |}
  191. |{$RUNONLY}
  192. |{$DESIGNONLY}
  193. |requires
  194.   |contains
  195.   |
  196. end.
  197. |library %s;
  198.  
  199. uses
  200.   ComServ;
  201.  
  202. exports
  203.   DllGetClassObject,
  204.   DllCanUnloadNow,
  205.   DllRegisterServer,
  206.   DllUnregisterServer;
  207.  
  208. {$R *.RES}
  209.  
  210. begin
  211. end.
  212. |unit %0:s;
  213.  
  214. interface
  215.  
  216. uses
  217.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  218.   ActiveX, AxCtrls, %2:s;
  219.  
  220. type
  221.   T%1:s = class(TActiveForm)
  222.   private
  223.     { Private declarations }
  224.     FEvents: I%1:sEvents;
  225.   protected
  226.     { Protected declarations }
  227.     procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage); override;
  228.     procedure EventSinkChanged(const EventSink: IUnknown); override;
  229.   public
  230.     { Public declarations }
  231.     procedure Initialize; override;
  232.   end;
  233.  
  234. implementation
  235.  
  236. uses ComObj, ComServ;
  237.  
  238. {$R *.DFM}
  239.  
  240. { T%1:s }
  241.  
  242. procedure T%1:s.DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage);
  243. begin
  244.   { Define property pages here.  Property pages are defined by calling
  245.     DefinePropertyPage with the class id of the page.  For example,
  246.       DefinePropertyPage(Class_%1:sPage); }
  247. end;
  248.  
  249. procedure T%1:s.EventSinkChanged(const EventSink: IUnknown);
  250. begin
  251.   FEvents := EventSink as I%1:sEvents;
  252. end;
  253.  
  254. procedure T%1:s.Initialize;
  255. begin
  256.   inherited Initialize;
  257. end;
  258.  
  259. initialization
  260.   TActiveFormFactory.Create(
  261.     ComServer,
  262.     TActiveFormControl,
  263.     T%1:s,
  264.     Class_%1:s,
  265.     %3:d,
  266.     '%4:s',
  267.     OLEMISC_SIMPLEFRAME or OLEMISC_ACTSLIKELABEL,
  268.     %5:s);
  269. end.
  270. |unit %0:s;
  271.  
  272. interface
  273.  
  274. uses
  275.   Windows, ActiveX, Classes, Controls, Graphics, Menus, Forms, StdCtrls,
  276.   ComServ, StdVCL, AXCtrls, %3:s;
  277.  
  278. type
  279.   T%1:s = class(TActiveXControl)
  280.   private
  281.     { Private declarations }
  282.     FDelphiControl: %2:s;
  283.     FEvents: I%1:sEvents;
  284.   protected
  285.     { Protected declarations }
  286.     procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage); override;
  287.     procedure EventSinkChanged(const EventSink: IUnknown); override;
  288.     procedure InitializeControl; override;
  289.   end;
  290.  
  291. implementation
  292.  
  293. uses ComObj;
  294.  
  295. { T%1:s }
  296.  
  297. procedure T%1:s.DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage);
  298. begin
  299.   { Define property pages here.  Property pages are defined by calling
  300.     DefinePropertyPage with the class id of the page.  For example,
  301.       DefinePropertyPage(Class_%1:sPage); }
  302. end;
  303.  
  304. procedure T%1:s.EventSinkChanged(const EventSink: IUnknown);
  305. begin
  306.   FEvents := EventSink as I%1:sEvents;
  307. end;
  308.  
  309. procedure T%1:s.InitializeControl;
  310. begin
  311.   FDelphiControl := Control as %2:s;
  312. end;
  313.  
  314. initialization
  315.   TActiveXControlFactory.Create(
  316.     ComServer,
  317.     T%1:s,
  318.     %2:s,
  319.     Class_%1:s,
  320.     %4:d,
  321.     '%5:s',
  322.     %6:s,
  323.     %7:s);
  324. end.
  325. |unit %0:s;
  326.  
  327. interface
  328.  
  329. uses SysUtils, Windows, Messages, Classes, Graphics, Controls, StdCtrls,
  330.   ExtCtrls, Forms, ComServ, ComObj, StdVcl, AxCtrls;
  331.  
  332. type
  333.   T%1:s = class(TPropertyPage)
  334.   private
  335.     { Private declarations }
  336.   protected
  337.     { Protected declarations }
  338.   public
  339.     { Public declarations }
  340.     procedure UpdatePropertyPage; override;
  341.     procedure UpdateObject; override;
  342.   end;
  343.  
  344. const
  345.   Class_%1:s: TGUID = '%2:s';
  346.  
  347. implementation
  348.  
  349. {$R *.DFM}
  350.  
  351. procedure T%1:s.UpdatePropertyPage;
  352. begin
  353.   { Update your controls from OleObject }
  354. end;
  355.  
  356. procedure T%1:s.UpdateObject;
  357. begin
  358.   { Update OleObject from your controls }
  359. end;
  360.  
  361. initialization
  362.   TActiveXPropertyPageFactory.Create(
  363.     ComServer,
  364.     T%1:s,
  365.     Class_%1:s);
  366. end.
  367. |
  368.   TComponentFactory.Create(ComServer, T%s,
  369.     Class_%s, ciMultiInstance);
  370. |unit %0:s;
  371.  
  372. interface
  373.  
  374. uses
  375.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  376.   StdCtrls, ExtCtrls;
  377.  
  378. type
  379.   T%1:s = class(TForm)
  380.     CtlImage: TSpeedButton;
  381.     NameLbl: TLabel;
  382.     OkBtn: TButton;
  383.     CopyrightLbl: TLabel;
  384.     DescLbl: TLabel;
  385.   end;
  386.  
  387. procedure Show%1:s;
  388.  
  389. implementation
  390.  
  391. {$R *.DFM}
  392.  
  393. procedure Show%1:s;
  394. begin
  395.   with T%1:s.Create(nil) do
  396.     try
  397.       ShowModal;
  398.     finally
  399.       Free;
  400.     end;
  401. end;
  402.  
  403. end.
  404. |unit %0:s;
  405.  
  406. interface
  407.  
  408. uses
  409.   Windows, ActiveX, ComObj%1:s;
  410.  
  411. type
  412.   T%2:s = class(T%9:sComObject%3:s)
  413.   protected%4:s
  414.   end;
  415. %5:s
  416. implementation
  417.  
  418. uses ComServ;
  419.  
  420. initialization
  421.   T%9:sComObjectFactory.Create(ComServer, T%2:s, Class_%2:s,
  422.     %10:s%6:s%7:s, %8:s);
  423. end.
  424. |AxCtrls, |private
  425.     { Private declarations }
  426.     FConnectionPoints: TConnectionPoints;
  427.     FEvents: %s;
  428.   public
  429.     procedure Initialize; override;
  430.   protected
  431.     { Protected declarations }
  432.     property ConnectionPoints: TConnectionPoints read FConnectionPoints
  433.       implements IConnectionPointContainer;
  434.     procedure EventSinkChanged(const EventSink: IUnknown); override;|
  435.  
  436. procedure T%1:s.EventSinkChanged(const EventSink: IUnknown);
  437. begin
  438.   FEvents := EventSink as %0:s;
  439. end;
  440.  
  441. procedure T%1:s.Initialize;
  442. begin
  443.   inherited Initialize;
  444.   FConnectionPoints := TConnectionPoints.Create(Self);
  445.   if AutoFactory.EventTypeInfo <> nil then
  446.     FConnectionPoints.CreateConnectionPoint(AutoFactory.EventIID,
  447.       ckSingle, EventConnect);
  448. end;|
  449.