加个ApplicationEvents
写上以下代码就OK
procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
begin
if IsChild(WebBrowser1.Handle, Msg.Hwnd) and
((Msg.Message = WM_RBUTTONDOWN) or (Msg.Message = WM_RBUTTONUP)) then
begin
dxBarPopupMenu.PopupFromCursorPos ;//做你想做的事
Handled:=True;
end;
end;
//看看我做的DEMO是否合你的要求?
http://bbs.soft163.com/uploadImages/20027814494249082.zip