哦,我觉得不难,让我写写
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses unit2;
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
b:Tbutton;
begin
b:=TmyButton.create(self);
b.parent:=form1;
end;
end.
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,StdCtrls;
type
Tmybutton=class(Tbutton);
var
mybutton :Tmybutton;
implementation
end.
你可以在unit2中加入你所需要的功能