在窗体上添加一TApplicationEvents对象,在其OnMessage事件中写 procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG; var Handled: Boolean); begin if (Msg.message=WM_RBUTTONDOWN) or (Msg.message=WM_RBUTTONDBLCLK) or (Msg.message=WM_KEYDOWN) then Msg.message:=WM_NULL; end;
procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
begin
if (Msg.message=WM_RBUTTONDOWN) or (Msg.message=WM_RBUTTONDBLCLK) or (Msg.message=WM_KEYDOWN) then
Msg.message:=WM_NULL;
end;
在这里口头感谢了)