Jamie Dainton wrote: > > Hello PICLIST, > > I'm trying to create a TButton object at run time in Delphi 5. The > code generates no errors but nothing happens. Here's the sample code: > This is Delphi4 code. procedure TYourForm.Button1Click(Sender: TObject); var B : TButton; begin B:=TButton.Create(Self); // Create it and set the owner to form); B.Parent := Self; // Make it visible on the form. B.SetBounds(0, 0, 10, 10); // Position it B.OnClick := UserButtonClick; B.Caption := 'New Button'; end; procedure TYourForm.UserButtonClick(Sender : TObject); begin // user buttons code end; -- Best regards Tony ICmicro's http://www.picnpoke.com mailto:sales@picnpoke.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.