http://lazarus.freepascal.org/index.php/topic,12870.msg66721.html
Thank you for the link. Unfortunately, this doesn't work.1. I already have Form.Visible := False;2. Adding the Form.Hide in the OnShow event makes it impossible for the user to display the form when they double click the sys tray icon.Is there anything else?
procedure TForm1.TrayIcon1Click(Sender: TObject);begin ShowWindow(Application.MainFormHandle,SW_SHOW);end;
Application.Initialize; Application.ShowMainForm := False; // Add this line, so mainform will not show at startup Application.CreateForm(TfrmMain, frmMain);