home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Expert 29
/
Pce29cd.iso
/
RUNIMAGE
/
DELPHI40
/
BIN
/
DPHIDE40.BPL
/
0
/
RCDATA
/
PASCRTRS
< prev
next >
Wrap
Text File
|
1998-06-16
|
8KB
|
449 lines
unit %s;
interface
implementation
end.
|unit %s;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
type
T%s = class(T%s)
private
{ Private declarations }
public
{ Public declarations }
end;
var
%1:s: T%1:s;
implementation
{$R *.DFM}
end.
|unit %s;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
type
%s = class(%s)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('%s', [%1:s]);
end;
end.
|unit %0:s;
interface
uses
ComObj, ActiveX, %3:s;
type
T%1:s = class(TAutoObject, %5:s)
%6:s
end;
implementation
uses ComServ;%7:s
initialization
TAutoObjectFactory.Create(ComServer, T%1:s, Class_%1:s,
%2:s, %4:s);
end.
|unit %0:s;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ComServ, ComObj, VCLCom, StdVcl, BdeProv, DataBkr, DBClient, %3:s;
type
T%1:s = class(TRemoteDataModule, I%1:s)
private
{ Private declarations }
public
{ Public declarations }
end;
var
%1:s: T%1:s;
implementation
{$R *.DFM}
initialization
TComponentFactory.Create(ComServer, T%1:s,
Class_%1:s, %2:s, %4:s);
end.
|unit %0:s;
interface
uses
Classes;
type
%1:s = class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
end;
implementation
{ Important: Methods and properties of objects in VCL can only be used in a
method called using Synchronize, for example,
Synchronize(UpdateCaption);
and UpdateCaption could look like,
procedure %1:s.UpdateCaption;
begin
Form1.Caption := 'Updated in a thread';
end; }
{ %1:s }
procedure %1:s.Execute;
begin
{ Place thread code here }
end;
end.
|program %s;
uses
Forms;
{$R *.RES}
begin
Application.Initialize;
Application.Run;
end.
|library |;
uses
ShareMem,
| LibMain;
|
exports
InitLibrary name LibrarySignature;
begin
|end.
|library %s;
{ Important note about DLL memory management: ShareMem must be the
first unit in your library's USES clause AND your project's (select
Project-View Source) USES clause if your DLL exports any procedures or
functions that pass strings as parameters or function results. This
applies to all strings passed to and from your DLL--even those that
are nested in records and classes. ShareMem is the interface unit to
the BORLNDMM.DLL shared memory manager, which must be deployed along
with your DLL. To avoid using BORLNDMM.DLL, pass string information
using PChar or ShortString parameters. }
uses
SysUtils,
Classes;
begin
end.
|package %s;
end.
|package |;
|{$DESCRIPTION |}
|{$RUNONLY}
|{$DESIGNONLY}
|requires
|contains
|
end.
|library %s;
uses
ComServ;
exports
DllGetClassObject,
DllCanUnloadNow,
DllRegisterServer,
DllUnregisterServer;
{$R *.RES}
begin
end.
|unit %0:s;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ActiveX, AxCtrls, %2:s;
type
T%1:s = class(TActiveForm)
private
{ Private declarations }
FEvents: I%1:sEvents;
protected
{ Protected declarations }
procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage); override;
procedure EventSinkChanged(const EventSink: IUnknown); override;
public
{ Public declarations }
procedure Initialize; override;
end;
implementation
uses ComObj, ComServ;
{$R *.DFM}
{ T%1:s }
procedure T%1:s.DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage);
begin
{ Define property pages here. Property pages are defined by calling
DefinePropertyPage with the class id of the page. For example,
DefinePropertyPage(Class_%1:sPage); }
end;
procedure T%1:s.EventSinkChanged(const EventSink: IUnknown);
begin
FEvents := EventSink as I%1:sEvents;
end;
procedure T%1:s.Initialize;
begin
inherited Initialize;
end;
initialization
TActiveFormFactory.Create(
ComServer,
TActiveFormControl,
T%1:s,
Class_%1:s,
%3:d,
'%4:s',
OLEMISC_SIMPLEFRAME or OLEMISC_ACTSLIKELABEL,
%5:s);
end.
|unit %0:s;
interface
uses
Windows, ActiveX, Classes, Controls, Graphics, Menus, Forms, StdCtrls,
ComServ, StdVCL, AXCtrls, %3:s;
type
T%1:s = class(TActiveXControl)
private
{ Private declarations }
FDelphiControl: %2:s;
FEvents: I%1:sEvents;
protected
{ Protected declarations }
procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage); override;
procedure EventSinkChanged(const EventSink: IUnknown); override;
procedure InitializeControl; override;
end;
implementation
uses ComObj;
{ T%1:s }
procedure T%1:s.DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage);
begin
{ Define property pages here. Property pages are defined by calling
DefinePropertyPage with the class id of the page. For example,
DefinePropertyPage(Class_%1:sPage); }
end;
procedure T%1:s.EventSinkChanged(const EventSink: IUnknown);
begin
FEvents := EventSink as I%1:sEvents;
end;
procedure T%1:s.InitializeControl;
begin
FDelphiControl := Control as %2:s;
end;
initialization
TActiveXControlFactory.Create(
ComServer,
T%1:s,
%2:s,
Class_%1:s,
%4:d,
'%5:s',
%6:s,
%7:s);
end.
|unit %0:s;
interface
uses SysUtils, Windows, Messages, Classes, Graphics, Controls, StdCtrls,
ExtCtrls, Forms, ComServ, ComObj, StdVcl, AxCtrls;
type
T%1:s = class(TPropertyPage)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
procedure UpdatePropertyPage; override;
procedure UpdateObject; override;
end;
const
Class_%1:s: TGUID = '%2:s';
implementation
{$R *.DFM}
procedure T%1:s.UpdatePropertyPage;
begin
{ Update your controls from OleObject }
end;
procedure T%1:s.UpdateObject;
begin
{ Update OleObject from your controls }
end;
initialization
TActiveXPropertyPageFactory.Create(
ComServer,
T%1:s,
Class_%1:s);
end.
|
TComponentFactory.Create(ComServer, T%s,
Class_%s, ciMultiInstance);
|unit %0:s;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls;
type
T%1:s = class(TForm)
CtlImage: TSpeedButton;
NameLbl: TLabel;
OkBtn: TButton;
CopyrightLbl: TLabel;
DescLbl: TLabel;
end;
procedure Show%1:s;
implementation
{$R *.DFM}
procedure Show%1:s;
begin
with T%1:s.Create(nil) do
try
ShowModal;
finally
Free;
end;
end;
end.
|unit %0:s;
interface
uses
Windows, ActiveX, ComObj%1:s;
type
T%2:s = class(T%9:sComObject%3:s)
protected%4:s
end;
%5:s
implementation
uses ComServ;
initialization
T%9:sComObjectFactory.Create(ComServer, T%2:s, Class_%2:s,
%10:s%6:s%7:s, %8:s);
end.
|AxCtrls, |private
{ Private declarations }
FConnectionPoints: TConnectionPoints;
FEvents: %s;
public
procedure Initialize; override;
protected
{ Protected declarations }
property ConnectionPoints: TConnectionPoints read FConnectionPoints
implements IConnectionPointContainer;
procedure EventSinkChanged(const EventSink: IUnknown); override;|
procedure T%1:s.EventSinkChanged(const EventSink: IUnknown);
begin
FEvents := EventSink as %0:s;
end;
procedure T%1:s.Initialize;
begin
inherited Initialize;
FConnectionPoints := TConnectionPoints.Create(Self);
if AutoFactory.EventTypeInfo <> nil then
FConnectionPoints.CreateConnectionPoint(AutoFactory.EventIID,
ckSingle, EventConnect);
end;|