Events OnMinimize , On Maximize
Capture the WM_SYSCOMMAND message .
A dding this line in the private part of the form's declaration .
TForm1 =
Class ( TForm )
Private
Procedure
WMSysCommand ( Var Message : TWMSysCommand ) ;
Message WM_SYSCOMMAND ;
End ;
And in the implementation, we put the
procedure :
Procedure TForm1.WMSysCommand ( Var Message : TWMSysCommand ) ;
Begin
If (
Message.CmdType = SC_MINIMIZE ) Or
( Message.CmdType = SC_MAXIMIZE ) Then
MessageBeep ( 0 ) ;
DefaultHandler ( Message ) ;
End ;