gypb:是的,必须过滤WM_SYSCOMMAND消息,因为你修改的是系统菜单么。最好重载WndProc过程:
...
protected
procedure WndProc(var Message: TMessage); override;
...
procedure TfrmPlay.WndProc(var Message: TMessage);
begin
case Message.Msg of
WM_SYSCOMMAND:
case Message.WParam of
SC_MINIMIZE://Do you want to do
SC_CLOSE://Do you want to do
SC_MAXIMIZE://Do you want to do
IDM_ABOUT:
ShowAbout......
else inherited;
end;
else inherited;
end;
end