簡體   English   中英

禁用 Internet Explorer 控件中的上下文菜單

[英]Disable context menu in Internet Explorer control

如何禁用 IE WebBrowser控件中的上下文菜單,而是執行 C# 中的右鍵單擊事件的自定義處理?

實際上:

WebBrowser browser;
browser.IsWebBrowserContextMenuEnabled = false;

這幾乎告訴 WebBrowser 不歡迎右鍵單擊上下文菜單。

WebBrowser browser;
browser.Document.ContextMenuShowing += new HtmlElementEventHandler(MyCustomContextMenuMethod);
AddHandler Me.WebBrowser1.Document.ContextMenuShowing, AddressOf WebContextMenuShowing

我一字不差地復制了你的問題並用我的google-fu來解決它......

這是在第一個結果頁面上:-P

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM