流
流水先生
Unregistered / Unconfirmed
GUEST, unregistred user!
首次做控件,以下是New Component创建的。注册在面板面,再把他放到form上,再del,del时出现错误,接着连delphi也蹦了。
unit Form1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
type
TForm1 = class(TForm)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
constructor Create(AOwner : TComponent); override;
destructor Destroy; override;
published
{ Published declarations }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('KTControl', [TForm1]);
end;
{ TForm1 }
constructor TForm1.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
end;
destructor TForm1.Destroy;
begin
inherited Destroy;
end;
end.
unit Form1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
type
TForm1 = class(TForm)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
constructor Create(AOwner : TComponent); override;
destructor Destroy; override;
published
{ Published declarations }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('KTControl', [TForm1]);
end;
{ TForm1 }
constructor TForm1.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
end;
destructor TForm1.Destroy;
begin
inherited Destroy;
end;
end.