标签:http color os io for div ar app
//屏蔽右键菜单
procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
begin
with Msg do
begin
if not
IsChild(WebBrowser1.Handle, hWnd) then
Exit;
Handled :=
(message= WM_RBUTTONDOWN) or(message= WM_RBUTTONUP)
or(message=
WM_CONTEXTMENU);
end;
end;
//替换右键菜单
procedure
TForm1.ApplicationEvents1Message(var Msg:
tagMSG;
var Handled:
Boolean);
var pt: TPoint;
begin
if IsChild(WebBrowser1.Handle, Msg.Hwnd) and ((Msg.Message =
WM_RBUTTONDOWN) or(Msg.Message = WM_RBUTTONUP)) then
begin
GetCursorPos(pt); //得到光标位置
PopupMenu1.Popup(pt.X,
pt.Y); //弹出popupmenu1的菜单
Handled:=True;
end;
end;
delphi 18 屏蔽和替换 右键菜单,布布扣,bubuko.com
标签:http color os io for div ar app
原文地址:http://www.cnblogs.com/xe2011/p/3876362.html