creating forms during runtime

1.Can somebody help me? I am trying to write code to create forms during
runtime. I wrote the following code to create a form with a button on it.
What I want to know is how I can set event handlers for this form. For
example, what code should I write if I want to change the caption of button1
to 'test2'.

2.What code should I use if I want to destroy the form after hiding it?

3.I am thinking of buying delphi 4 standard. Is it possible to install third
party components with this version?

Thanks alot!


procedure TForm1.Button1Click(Sender: TObject);
var form2 : TForm;
var button1 :Tbutton;
  form2 := Tform.Create(self);
  button1 := tbutton.Create(self);
  button1.Caption := 'test';
  button1.Top := 2;
  button1.Left := 2;
  button1.Height := 15;
  button1.Width := 50;