home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 August
/
VPR9708A.ISO
/
D3TRIAL
/
INSTALL
/
DATA.Z
/
delphi32.exe
/
RCDATA
/
MODULES
< prev
next >
Wrap
Text File
|
1997-05-14
|
6KB
|
334 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 宣言 }
public
{ Public 宣言 }
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 宣言 }
protected
{ Protected 宣言 }
public
{ Public 宣言 }
published
{ Published 宣言 }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('%s', [%1:s]);
end;
end.
|unit %0:s;
interface
uses
ComObj, %3:s;
type
T%1:s = class(TAutoObject, I%1:s)
protected
end;
implementation
uses ComServ;
initialization
TAutoObjectFactory.Create(ComServer, T%1:s, Class_%1:s, %2:s);
end.
|unit %0:s;
interface
uses
Classes;
type
%1:s = class(TThread)
private
{ Private 宣言 }
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,
注意: VCL のメソッド/関数/プロパティを扱うには、以下のように
Synchronize メソッドの引数として渡したメソッドの中から扱う必要があります。
Synchronize(UpdateCaption);
and UpdateCaption could look like,
UpdateCaption の中では以下のように VCL を呼び出すことができます。
procedure %1:s.UpdateCaption;
begin
// Form1.Caption := 'Updated in a thread';
Form1.Caption := 'スレッドから書き換えました';
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;
{ DLL でのメモリ管理について:
もしこの DLL が引数や返り値として String 型を使う関数/手続きを
エクスポートする場合、以下の USES 節とこの DLL を使うプロジェクトソースの
USES 節の両方に、最初に現れるユニットとして ShareMem を指定しなけれ
ばなりません。
これは構造体やクラスに埋め込まれている場合も含め String 型を DLL
とやり取りする場合に必ず必要となります。
ShareMem は共用メモリマネージャである DELPHIMM.DLL とのインターフェース
です。あなたの DLL と一緒に配布する必要があります。
DELPHIMM.DLL を使うのを避けるには、PChar または ShortString 型を
使って文字列のやり取りをおこなってください。}
uses
SysUtils,
Classes;
begin
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 宣言 }
FEvents: I%1:sEvents;
protected
{ Protected 宣言 }
procedure EventSinkChanged(const EventSink: IUnknown); override;
procedure Initialize; override;
public
{ Public 宣言 }
end;
implementation
uses ComServ;
{$R *.DFM}
{ T%1:s }
procedure T%1:s.EventSinkChanged(const EventSink: IUnknown);
begin
FEvents := EventSink as I%1:sEvents;
end;
procedure T%1:s.Initialize;
begin
end;
initialization
TActiveFormFactory.Create(
ComServer,
TActiveFormControl,
T%1:s,
Class_%1:s,
%3:d,
'%4:s',
OLEMISC_SIMPLEFRAME or OLEMISC_ACTSLIKELABEL);
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 宣言 }
FDelphiControl: %2:s;
FEvents: I%1:sEvents;
protected
{ Protected 宣言 }
procedure InitializeControl; override;
procedure EventSinkChanged(const EventSink: IUnknown); override;
procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage); override;
end;
implementation
{ T%1:s }
procedure T%1:s.InitializeControl;
begin
FDelphiControl := Control as %2:s;
end;
procedure T%1:s.EventSinkChanged(const EventSink: IUnknown);
begin
FEvents := EventSink as I%1:sEvents;
end;
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;
initialization
TActiveXControlFactory.Create(
ComServer,
T%1:s,
%2:s,
Class_%1:s,
%4:d,
'%5:s',
%6: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 宣言 }
protected
procedure UpdatePropertyPage; override;
procedure UpdateObject; override;
public
{ Public 宣言 }
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);
|