拦截系统菜单消息,就行了。 这是拦截关闭的消息。最小化只要把msg.CmdType =sc_close中的sc_close 变一下就行了。 public procedure Closeshut(var msg:twmsyscommand);message WM_syscommand; procedure tFrmRegister.CloseShut(var msg:twmsyscommand); begin if msg.CmdType =sc_close then begin if true then close else application.Terminate; end else inherited; end;
怎样拦截呢?
msn:[email protected]
这是拦截关闭的消息。最小化只要把msg.CmdType =sc_close中的sc_close
变一下就行了。
public
procedure Closeshut(var msg:twmsyscommand);message WM_syscommand;
procedure tFrmRegister.CloseShut(var msg:twmsyscommand);
begin
if msg.CmdType =sc_close then
begin
if true then
close
else
application.Terminate;
end
else
inherited;
end;
能说详细点么?我在帮助文件里查不到这个类
自己解决了!