?? mytimerprj_tlb.~pas
字號:
unit MyTimerPrj_TLB;
// ************************************************************************ //
// WARNING
// -------
// The types declared in this file were generated from data read from a
// Type Library. If this type library is explicitly or indirectly (via
// another type library referring to this type library) re-imported, or the
// 'Refresh' command of the Type Library Editor activated while editing the
// Type Library, the contents of this file will be regenerated and all
// manual modifications will be lost.
// ************************************************************************ //
// PASTLWTR : 1.2
// File generated on 2006-07-01 21:42:22 from Type Library described below.
// ************************************************************************ //
// Type Lib: E:\DPFlash\MyTimerPrj.tlb (1)
// LIBID: {F7AFC977-DBA3-4EF9-8650-64E50ED124E7}
// LCID: 0
// Helpfile:
// HelpString: MyTimerPrj Library
// DepndLst:
// (1) v2.0 stdole, (E:\WINDOWS\system32\stdole2.tlb)
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface
uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL, Variants;
// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:
// Type Libraries : LIBID_xxxx
// CoClasses : CLASS_xxxx
// DISPInterfaces : DIID_xxxx
// Non-DISP interfaces: IID_xxxx
// *********************************************************************//
const
// TypeLibrary Major and minor versions
MyTimerPrjMajorVersion = 1;
MyTimerPrjMinorVersion = 0;
LIBID_MyTimerPrj: TGUID = '{F7AFC977-DBA3-4EF9-8650-64E50ED124E7}';
IID_IMyTimer: TGUID = '{0BDE8FE0-8775-4E71-A35F-9189312E3C4A}';
DIID_IMyTimerEvents: TGUID = '{41AF8A0D-628C-433A-8C51-9CEE8B6A3A85}';
CLASS_MyTimer: TGUID = '{677550F8-9245-49FB-A536-676A7EF91EA8}';
// *********************************************************************//
// Declaration of Enumerations defined in Type Library
// *********************************************************************//
// Constants for enum TxActiveFormBorderStyle
type
TxActiveFormBorderStyle = TOleEnum;
const
afbNone = $00000000;
afbSingle = $00000001;
afbSunken = $00000002;
afbRaised = $00000003;
// Constants for enum TxPrintScale
type
TxPrintScale = TOleEnum;
const
poNone = $00000000;
poProportional = $00000001;
poPrintToFit = $00000002;
// Constants for enum TxMouseButton
type
TxMouseButton = TOleEnum;
const
mbLeft = $00000000;
mbRight = $00000001;
mbMiddle = $00000002;
type
// *********************************************************************//
// Forward declaration of types defined in TypeLibrary
// *********************************************************************//
IMyTimer = interface;
IMyTimerDisp = dispinterface;
IMyTimerEvents = dispinterface;
// *********************************************************************//
// Declaration of CoClasses defined in Type Library
// (NOTE: Here we map each CoClass to its Default Interface)
// *********************************************************************//
MyTimer = IMyTimer;
// *********************************************************************//
// Interface: IMyTimer
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {0BDE8FE0-8775-4E71-A35F-9189312E3C4A}
// *********************************************************************//
IMyTimer = interface(IDispatch)
['{0BDE8FE0-8775-4E71-A35F-9189312E3C4A}']
function Get_Enabled: WordBool; safecall;
procedure Set_Enabled(Value: WordBool); safecall;
function Get_Interval: Integer; safecall;
procedure Set_Interval(Value: Integer); safecall;
function Get_Resolution: Integer; safecall;
procedure Set_Resolution(Value: Integer); safecall;
procedure AboutBox; safecall;
property Enabled: WordBool read Get_Enabled write Set_Enabled;
property Interval: Integer read Get_Interval write Set_Interval;
property Resolution: Integer read Get_Resolution write Set_Resolution;
end;
// *********************************************************************//
// DispIntf: IMyTimerDisp
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {0BDE8FE0-8775-4E71-A35F-9189312E3C4A}
// *********************************************************************//
IMyTimerDisp = dispinterface
['{0BDE8FE0-8775-4E71-A35F-9189312E3C4A}']
property Enabled: WordBool dispid -514;
property Interval: Integer dispid 201;
property Resolution: Integer dispid 202;
procedure AboutBox; dispid -552;
end;
// *********************************************************************//
// DispIntf: IMyTimerEvents
// Flags: (4096) Dispatchable
// GUID: {41AF8A0D-628C-433A-8C51-9CEE8B6A3A85}
// *********************************************************************//
IMyTimerEvents = dispinterface
['{41AF8A0D-628C-433A-8C51-9CEE8B6A3A85}']
procedure OnTimer; dispid 201;
end;
// *********************************************************************//
// OLE Control Proxy class declaration
// Control Name : TMyTimer
// Help String : MyTimer Control
// Default Interface: IMyTimer
// Def. Intf. DISP? : No
// Event Interface: IMyTimerEvents
// TypeFlags : (38) CanCreate Licensed Control
// *********************************************************************//
TMyTimer = class(TOleControl)
private
FOnTimer: TNotifyEvent;
FIntf: IMyTimer;
function GetControlInterface: IMyTimer;
protected
procedure CreateControl;
procedure InitControlData; override;
public
procedure AboutBox;
property ControlInterface: IMyTimer read GetControlInterface;
property DefaultInterface: IMyTimer read GetControlInterface;
property Enabled: WordBool index -514 read GetWordBoolProp write SetWordBoolProp;
published
property Anchors;
property Interval: Integer index 201 read GetIntegerProp write SetIntegerProp stored False;
property Resolution: Integer index 202 read GetIntegerProp write SetIntegerProp stored False;
property OnTimer: TNotifyEvent read FOnTimer write FOnTimer;
end;
procedure Register;
resourcestring
dtlServerPage = 'Servers';
dtlOcxPage = 'ActiveX';
implementation
uses ComObj;
procedure TMyTimer.InitControlData;
const
CEventDispIDs: array [0..0] of DWORD = (
$000000C9);
CLicenseKey: array[0..38] of Word = ( $007B, $0031, $0039, $0037, $0042, $0031, $0035, $0031, $0041, $002D, $0039
, $0044, $0036, $0046, $002D, $0034, $0044, $0043, $0043, $002D, $0042
, $0041, $0041, $0038, $002D, $0045, $0034, $0042, $0035, $0031, $0044
, $0032, $0044, $0044, $0036, $0038, $0042, $007D, $0000);
CControlData: TControlData2 = (
ClassID: '{677550F8-9245-49FB-A536-676A7EF91EA8}';
EventIID: '{41AF8A0D-628C-433A-8C51-9CEE8B6A3A85}';
EventCount: 1;
EventDispIDs: @CEventDispIDs;
LicenseKey: @CLicenseKey;
Flags: $00000008;
Version: 401);
begin
ControlData := @CControlData;
TControlData2(CControlData).FirstEventOfs := Cardinal(@@FOnTimer) - Cardinal(Self);
end;
procedure TMyTimer.CreateControl;
procedure DoCreate;
begin
FIntf := IUnknown(OleObject) as IMyTimer;
end;
begin
if FIntf = nil then DoCreate;
end;
function TMyTimer.GetControlInterface: IMyTimer;
begin
CreateControl;
Result := FIntf;
end;
procedure TMyTimer.AboutBox;
begin
DefaultInterface.AboutBox;
end;
procedure Register;
begin
RegisterComponents(dtlOcxPage, [TMyTimer]);
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -