How to force a form to stay iconized (Views: 28)
Problem/Question/Abstract: 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: // e.g. the private section procedure WMQueryOpen(var Msg: TWMQueryOpen); message WM_QUERYOPEN; implementation // .. procedure TForm1.WMQueryOpen(var Msg: TWMQueryOpen); begin Msg.Result := 0; end; |