ddhsuper.pas
来自「Delphi高级开发指南是开发程序的好帮手」· PAS 代码 · 共 57 行
PAS
57 行
unit DdhSuper;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls,
Forms, Dialogs;
{$R *.DCR}
type
TDdhSuperNothing = class(TCustomControl)
public
constructor Create (Owner: TComponent); override;
published
property Width default 200;
property Height default 200;
property Align;
property Color;
property DragMode;
property ShowHint;
property Visible;
property Enabled;
property OnClick;
property OnDblClick;
property OnMouseDown;
property OnMouseUp;
property OnMouseMove;
property OnDragDrop;
property OnDragOver;
property OnEndDrag;
property OnStartDrag;
end;
procedure Register;
implementation
constructor TDdhSuperNothing.Create (Owner: TComponent);
begin
// call parent class constructor first
inherited Create (Owner);
// set the size
Width := 200;
Height := 200;
// set special styles
ControlStyle := [csAcceptsControls, csFramed,
csFixedWidth, csFixedHeight];
end;
procedure Register;
begin
RegisterComponents('DDHB', [TDdhSuperNothing]);
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?