[英]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.