笑
笑他
Unregistered / Unconfirmed
GUEST, unregistred user!
unit Button1;
interface
uses
Windows, Messages, SysUtils, Classes, Controls, StdCtrls;
type
TButton1 = class(TButton)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
procedure showform;
published
{ Published declarations }
end;
procedure Register;
implementation
uses Unit2;
procedure Register;
begin
RegisterComponents('txmFrame', [TButton1]);
end;
{ TButton1 }
procedure TButton1.showform;
begin
with form2.Create(nil) do
Form2.ShowModal;
form2.Free;
end;
end.
其中form2是任意一个窗体
interface
uses
Windows, Messages, SysUtils, Classes, Controls, StdCtrls;
type
TButton1 = class(TButton)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
procedure showform;
published
{ Published declarations }
end;
procedure Register;
implementation
uses Unit2;
procedure Register;
begin
RegisterComponents('txmFrame', [TButton1]);
end;
{ TButton1 }
procedure TButton1.showform;
begin
with form2.Create(nil) do
Form2.ShowModal;
form2.Free;
end;
end.
其中form2是任意一个窗体