需要捕捉WM_SYSCOMMAND消息,然后作出判断。 procedure WMSysCommand(var Msg: TMessage); begin if Msg.wParam <> SC_CLOSE then inherited; end;
借上面兄弟的话头具体点。 public procedure WMSysCommand(var Msg: TMessage);WM_SYSCOMMAND;Implementationprocedure TForm1.WMSysCommand(var Msg: TMessage); begin if Msg.wParam <> SC_CLOSE then inherited; end;
procedure WMSysCommand(var Msg: TMessage);
begin
if Msg.wParam <> SC_CLOSE then
inherited;
end;
public
procedure WMSysCommand(var Msg: TMessage);WM_SYSCOMMAND;Implementationprocedure TForm1.WMSysCommand(var Msg: TMessage);
begin
if Msg.wParam <> SC_CLOSE then
inherited;
end;