如题,另外还有什么方法可屏蔽IE的默认快捷方式,如F5,Ctrl+属性键等
解决方案 »
- 大家帮我看看这段代码怎么错了?2
- 请问Delphi有没有关于并行计算和并行处理方面的资料
- 各位大哥,帮我看看我这是错在那里啊?
- TMaskEdit的问题
- 如何用DBgrideh打印出表头的内容:表头,日期,公司名称等等???
- delphi对BIT操作的操作符和数据结构都有那些
- 类型转换:Ascii转字符型 十六进制Hex转字符型
- My E_mail : [email protected], who tell me the E_mail address's POP3/SMTP server Nmae ?
- 请教如何将软盘中的EXCEL数据导入到SQL数据库中(用程序实现),请给出例子或设计提示?
- 有谁用过CBX RIA框架?
- 请教高手~~~~~~~~~~~~~~
- 这种XP风格的界面在Delphi中怎么实现阿?
自己实现这个接口,需要用到的接口定义如下
IDocHostUIHandler = interface(IUnknown)
['{bd3f23c0-d43e-11cf-893b-00aa00bdce1a}']
function ShowContextMenu(const dwID: DWORD; const ppt: PPOINT;
const pcmdtReserved: IUnknown; const pdispReserved: IDispatch): HRESULT; stdcall;
function GetHostInfo(var pInfo: TDOCHOSTUIINFO): HRESULT; stdcall;
function ShowUI(const dwID: DWORD; const pActiveObject: IOleInPlaceActiveObject;
const pCommandTarget: IOleCommandTarget; const pFrame: IOleInPlaceFrame;
const pDoc: IOleInPlaceUIWindow): HRESULT; stdcall;
function HideUI: HRESULT; stdcall;
function UpdateUI: HRESULT; stdcall;
function EnableModeless(const fEnable: BOOL): HRESULT; stdcall;
function OnDocWindowActivate(const fActivate: BOOL): HRESULT; stdcall;
function OnFrameWindowActivate(const fActivate: BOOL): HRESULT; stdcall;
function ResizeBorder(const prcBorder: PRECT;
const pUIWindow: IOleInPlaceUIWindow;
const fRameWindow: BOOL): HRESULT; stdcall;
function TranslateAccelerator(const lpMsg: PMSG; const pguidCmdGroup: PGUID;
const nCmdID: DWORD): HRESULT; stdcall;
function GetOptionKeyPath(var pchKey: POLESTR; const dw: DWORD): HRESULT; stdcall;
function GetDropTarget(const pDropTarget: IDropTarget;
out ppDropTarget: IDropTarget): HRESULT; stdcall;
function GetExternal(out ppDispatch: IDispatch): HRESULT; stdcall;
function TranslateUrl(const dwTranslate: DWORD; const pchURLIn: POLESTR;
var ppchURLOut: POLESTR): HRESULT; stdcall;
function FilterDataObject(const pDO: IDataObject;
out ppDORet: IDataObject): HRESULT; stdcall;
end;
ICustomDoc=interface(IUnknown)
['{3050f3f0-98b5-11cf-bb82-00aa00bdce0b}']
function SetUIHandler(const pUIHandler:IDocHostUIHandler):HRESULT; stdcall;
end;ICustomDoc接口是设置IDocHostUIHandler的接口
使用如下
(webbrowser1.document as ICustomDoc).SetUIHandler(IDocHostUIHandler的实例);
EmbeddedWb
比較簡單
http://www.euromind.com/iedelphi/embeddedwb.htmDisable the Context MenuUse property OnShowContextMenu to manipulate the context menu, that appears when you right-click the mouse.To disable the context menu you only need to add one line of code:Function TForm1.EmbeddedWB1ShowContextMenu(const dwID: Cardinal;
const ppt: PPoint; const pcmdtReserved: IUnknown;
const pdispReserved: IDispatch): HRESULT;
begin
result := S_OK;
end;
說的已經是正解了
其实是把我说的方法封装了一下。