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: unit createObjectsMain; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls; type TTFormCreateObjects = class(TForm) StatusBar1: TStatusBar; procedure FormClick(Sender: TObject); procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); procedure CreateBalls; private { Private declarations } public { Public declarations } end; var TFormCreateObjects: TTFormCreateObjects; num:integer; implementation {$R *.DFM} { TTFormCreateObjects } procedure ttformcreateobjects.CreateBalls; var objectThing:TButton; //instance variable of type TButton begin objectThing:=TButton.Create(TFormCreateObjects); //use the form as the owner {I have tried using self and other owners but the manual says to use the form.} objectThing.left:=Mouse.CursorPos.x; objectThing.Top:=Mouse.CursorPos.y; objectThing.height:=25; objectThing.Width:=125; objectThing.Caption:='Test Caption'; objectThing.Visible:=true; //if objectthing.show is called the stack overflows. end; procedure TTFormCreateObjects.FormClick(Sender: TObject); begin CreateBalls; end; procedure TTFormCreateObjects.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin StatusBar1.Panels.Items[0].text:=((inttostr(mouse.cursorpos.x)) + ':' + (inttostr(mouse.cursorpos.y))); end; end. ============================END OF CODE============================== Can anyone help? -- From Jamie Dainton Tuesday, September 26, 2000 10:37:50 The Bat! 1.46 Beta/5 Windows 98 4.10 2222 mailto:pgp@dainton.org.uk?subject=sendKey -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.