Author: Tomas Rutkauskas
How to force a form to stay iconized
Answer:
If your application should be iconized from the beginning, set the for property
WindowState to wsMinimized.
To keep a form iconized (and prevent a restore), add the following handler to your
form class definition:
1 // e.g. the private section2 3 procedure WMQueryOpen(var Msg: TWMQueryOpen); message WM_QUERYOPEN;
4 5 implementation6 7 // ..8 9 procedure TForm1.WMQueryOpen(var Msg: TWMQueryOpen);
10 begin11 Msg.Result := 0;
12 end;