type里面有如下定义:
TerminateForm=class(TForm)
private
libing : TLabel;
end;然后:procedure TForm1.Button4Click(Sender: TObject);
var
haha:TerminateForm;
begin
haha.Show;
haha.libing.Caption:='welcome ! ';
end;怎么点完button4没有反应,haha.show在做什么,怎么没show出来!
TerminateForm=class(TForm)
private
libing : TLabel;
end;然后:procedure TForm1.Button4Click(Sender: TObject);
var
haha:TerminateForm;
begin
haha.Show;
haha.libing.Caption:='welcome ! ';
end;怎么点完button4没有反应,haha.show在做什么,怎么没show出来!
var
haha:TerminateForm;
begin
haha := TerminateForm.Create;
haha.Show;
haha.libing.Caption:='welcome ! ';
end;
haha := TerminateForm.Create;没有足够的参数!
type里面有如下定义:
TerminateForm=class(TForm)
private
libing : TLabel;
public:
procedurce setLable(str:string);
end;procedure TTerminateForm.setLable(str:string);
begin
libing.Caption:=str;
end;
procedure TForm1.Button4Click(Sender: TObject);
var
haha:TerminateForm;
begin
haha:=TerminateForm.Create;
haha.setLable('welcome');
haha.Show;
end;
var
haha:TerminateForm;
begin
haha := TerminateForm.Create(Self);
haha.Show;
haha.libing.Caption:='welcome ! ';
end;
haha := TerminateForm.Create(Self);
//(Y)
//应该OK通过
//快测试吧
type里面有如下定义:
TerminateForm=class(TForm)
private
libing : TLabel;
public:
procedurce SetLabelCaption(str:string);//所加的表单过程
end;
//所加过程的实现
procedure TTerminateForm.SetLabelCaption(str:string);
begin
libing.Caption:=str;
end;//对类的继承生成
procedure TForm1.Button4Click(Sender: TObject);
var
haha:TerminateForm;
begin
haha:=TerminateForm.Create(self);
haha.setLable('根据表单类所生成的表单');
haha.Show;
end;