{ 函数说明:禁用右键弹出菜单 } procedure TFrm_Real.ProcessMsg(var Msg:TMsg;var Handled:boolean); begin with Msg do if((message=WM_RBUTTONDOWN) or (message=WM_RBUTTONDBLCLK)) or (message=WM_CONTEXTMENU) then begin Handled:=true; end; end;Form Create事件中加上: Application.OnMessage:=ProcessMsg;
函数说明:禁用右键弹出菜单
}
procedure TFrm_Real.ProcessMsg(var Msg:TMsg;var Handled:boolean);
begin
with Msg do
if((message=WM_RBUTTONDOWN) or
(message=WM_RBUTTONDBLCLK)) or
(message=WM_CONTEXTMENU) then
begin
Handled:=true;
end;
end;Form Create事件中加上:
Application.OnMessage:=ProcessMsg;
具体的去找一下csdn中的intraweb资料吧.
在窗体的属性Javascript中
加如下代码
------------------------------
function click1()
{
if(event.button==2)
{
// return true;
alert(' 对不起鼠标右键已被屏蔽!');
}
}document.onmousedown=click1;
-------------------------------------
这个无效