delphi TWebBrowser控件禁用鼠标右键


本文整理自网络,侵删。

 在窗体上放置一个TApplicationEvents控件(在Additional面板),编写该控件的OnMessage事件响应代码:

procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
  var Handled: Boolean);
begin
  if (Msg.message = wm_rbuttondown) or (Msg.message = wm_rbuttonup) or (msg.message = WM_RBUTTONDBLCLK)   then
    if IsChild(WebBrowser1.Handle, Msg.hwnd) then
      Handled := true;//如果有其他需要处理的,在这里加上你要处理的代码
end;

相关阅读 >>

Delphi fastreport 直接列印

Delphi xe8 无法进入android的调试状态

Delphi idhttpserver实现webservice

Delphi 去掉文件只读属性

Delphi serial number of an usb flash drive 获取u盘硬件序列号

Delphi10.3 构造生成输出json数据

Delphi 10 seattle中使用本地通知,请使用tnotificationcenter组件

Delphi xe berlin readprocessmemory writeprocessmemory

Delphi dll初始化和退出处理

Delphi 安卓原生的toast温柔提示

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...