我是新手我怕谁!!!
N年以后我也是一个高手!!现在处于学习阶段,请高手们多多指教!
N年以后我再指教别人!

解决方案 »

  1.   

    var
      t:TButton;
    begin
      t:=TButton.Create(Nil);
      with t do
      begin 
        parent:=form1;
        caption:='??';
        Name:='??';
        Left:=??;
        Top:=??;
      end
    end
      

  2.   

    t:=TButton.Create(Nil);
    这一句改为
    t:=TButton.Create(self);
    更好
      

  3.   

    var
      t:TButton
    implementation
        t:=Tbutton.Create(self);
      t.Parent:=self;
      t.Left:=100;
      t.Top:=100;
      t.Name:='fd';
      t.Height:=30;
      

  4.   

    var
      t:TButton;
    begin
      t:=TButton.Create(Self);
      with t do
      begin 
        parent:=form1;
        caption:='??';
        Name:='??';
        Left:=??;
        Top:=??;
        OnClick := Pro1;
      end;
    end;
      

  5.   

    with TButton.Create(nil) do begin
              Parent        := 你的窗体;
              Font.Name    := 宋体;
              Font.Size    := 9;
              Caption       := LoadStr(SClose);
              Name          := 'CloseButton';
              OnClick       := DialogCloseButtonClick;
              SetBounds(248,200,81,23);
            end;