首先添加TApplicationEvents
procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
begin
//屏敝网页右键
if (Msg.message = WM_RBUTTONDOWN) or (Msg.Message = WM_RBUTTONUP) then
begin
//如果去掉下面这行就是屏蔽右键菜单,现在为自定义右键菜单
//PopupMenu1.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y);
Handled := True;
end;
end;
就是这样的 呵呵