如果这个不行 用下面的试一试 private AppMessage(var Msg:TMSG;var Handled:Boolean);procedure TForm1.AppMessage(var Msg:TMSG;var Handled:Boolean); begin Handled:=False; case Msg.Message of WM_SYSKEYDOWN: if Msg.wParam=VK_F4 then handled:=true; end; end; 在OnCreate里面 Application.OnMessage:=AppMessage; 这利用的是屏蔽系统键F4end;
用下面的试一试
private AppMessage(var Msg:TMSG;var Handled:Boolean);procedure TForm1.AppMessage(var Msg:TMSG;var Handled:Boolean);
begin
Handled:=False;
case Msg.Message of
WM_SYSKEYDOWN:
if Msg.wParam=VK_F4 then
handled:=true;
end;
end;
在OnCreate里面
Application.OnMessage:=AppMessage;
这利用的是屏蔽系统键F4end;