我找到了解决方案。谢谢你。这是一个例子:
__fastcall TForm2::TForm2(TComponent* Owner): TForm(Owner)
{
TButton* b = new TButton(this);
b->Parent = this;
b->Height = 100;
b->Width = 100;
b->Left = 0;
b->Top = 0;
b->Caption = "Testing";
b->Visible = true;
b->Enabled = true;
}