procedure TForm2.WndProc(var message: TMessage);
begin
if (message.Msg=WM_SYSCOMMAND) and (message.WParam=SC_MINIMIZE) then
Application.Minimize;
inherited;
end;
type
TForm2 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
procedure WndProc(var message:TMessage);Override;
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
{ TForm2 }
procedure TForm2.WndProc(var message: TMessage);
begin
if (message.Msg=WM_SYSCOMMAND) and (message.WParam=SC_MINIMIZE) then
Application.Minimize;
inherited;
end;