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出来!

解决方案 »

  1.   

    晕procedure TForm1.Button4Click(Sender: TObject);
    var
      haha:TerminateForm;
    begin
      haha := TerminateForm.Create;
      haha.Show;
      haha.libing.Caption:='welcome ! ';
    end;
      

  2.   

    我是过了呀
    haha := TerminateForm.Create;没有足够的参数!
      

  3.   

    下班了,呵呵,最后一贴
    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;
      

  4.   

    晕procedure TForm1.Button4Click(Sender: TObject);
    var
      haha:TerminateForm;
    begin
      haha := TerminateForm.Create(Self);
      haha.Show;
      haha.libing.Caption:='welcome ! ';
    end;
      

  5.   

    //
    haha := TerminateForm.Create(Self);
    //(Y)
    //应该OK通过
    //快测试吧
      

  6.   

    在type中如下过程如
    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;