var Button: TButton; begin button := TButton.Create(self); with button do begin Parent := self; top := 12; ...... end; end;三少 :o)
你们在代码都不错但我用TLABEL类时且没有显示,不知是何故??
procedure TForm1.Button1Click(Sender: TObject); var Lbl: TLabel; begin Lbl := TLabel.Create(Self); with Lbl do begin Parent := Self; AutoSize := True; Top := 10; Left := 10; Caption := '干掉日本鬼子'; end; end;Try it Good luck三少 :o)
Button: TButton;
begin
button := TButton.Create(self);
with button do
begin
Parent := self;
top := 12;
......
end;
end;三少 :o)
var
Lbl: TLabel;
begin
Lbl := TLabel.Create(Self);
with Lbl do
begin
Parent := Self;
AutoSize := True;
Top := 10;
Left := 10;
Caption := '干掉日本鬼子';
end;
end;Try it
Good luck三少 :o)
马上给分,记得下次再关照.