1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32:
| procedure TMainForm.FormShow(Sender: TObject); var hwndOwner: HWnd; begin hwndOwner := GetWindow(Handle, GW_OWNER); ShowWindow(hwndOwner, SW_HIDE); // For Windows 2000, additionally call the ShowWindowAsync function: ShowWindowAsync(hwndOwner, SW_HIDE); ShowWindowAsync(Self.Handle, SW_HIDE); end;
{ Prevent the form from reappearing on the Taskbar after minimizing it:
Verhindern, dass nach einem Minimize die Applikation wieder in der Taskbar erscheint: }
private procedure WMSysCommand(var msg: TWMSysCommand); message WM_SysCommand;
{....}
implementation
procedure TMainForm.WMSysCommand(var msg: TWMSysCommand); begin if msg.CmdType and $FFF0 = SC_MINIMIZE then hide else inherited; end; |