本文整理自网络,侵删。
在窗体上放置一个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 idhttpserver实现webservice
Delphi serial number of an usb flash drive 获取u盘硬件序列号
Delphi 10 seattle中使用本地通知,请使用tnotificationcenter组件
Delphi xe berlin readprocessmemory writeprocessmemory
更多相关阅读请进入《Delphi》频道 >>