H
HongYuan
Unregistered / Unconfirmed
GUEST, unregistred user!
错误:Resource TMyTest Not found
不知道是不是需要注册一下类?
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
TMyTest=class(TForm)
public
procedure abc;
end;
var
Form1: TForm1;
form2:TMyTest;
procedure test;
implementation
{$R *.dfm}
procedure test;
begin
form2:=TMyTest.Create(nil);
form2.abc;
end;
{ TMyTest }
procedure TMyTest.abc;
begin
ShowMessage('a');
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
test
end;
end.
不知道是不是需要注册一下类?
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
TMyTest=class(TForm)
public
procedure abc;
end;
var
Form1: TForm1;
form2:TMyTest;
procedure test;
implementation
{$R *.dfm}
procedure test;
begin
form2:=TMyTest.Create(nil);
form2.abc;
end;
{ TMyTest }
procedure TMyTest.abc;
begin
ShowMessage('a');
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
test
end;
end.