You need to set the ShowMainForm and MainFormOnTaskBar properties to False before the form is created.
Open your project source and set MainFormOnTaskBar and ShowMainForm to False, before the form is created.
Application.Initialize;
Application.MainFormOnTaskbar := false;
Application.ShowMainForm := false;
Application.CreateForm(TForm1, Form1);
Then on your main form add the following code to the FormActivate and FormShow events.
procedure TForm1.FormActivate(Sender: TObject);
begin
// hide taskbar button
ShowWindow(Application.Handle, SW_HIDE);
end;
procedure TForm1.FormShow(Sender: TObject);
begin
// hide taskbar button
ShowWindow(Application.Handle, SW_HIDE);
end;
I have tested with Dephi 2007 and 2009. Additional information is available here.