Prevent Windows from minimizing a Form

Prevent Windows from minimizing a Form

The Windows Taskbar function “Minimize all Windows” minimizes all Windows
even if they don’t have a minimize button.
The following code will prevent a form from minimizing through windows.

implementation

procedure TForm1.WMShowWindow(var Msg: TWMShowWindow);
begin
     if not Msg.Show then
        Msg.Result := 0
     else
         inherited;
end;