I'm using Axwebbrowser to display HTML page in my VB.NET application and i would like to know how disable its context menu ?
I use AxWebbrowser more than the original Webbrowser component because it handle the NewWindows 2 event that help me getting the popup url when a link is open in a new tab for example.
So i can't use the Webbrowser1.ContextMenuEnabled = False
Thanks for your answers
A simple method is to trap the WM_RBUTTONDOWN and WM_RBUTTONDBLCLK messages at the application level. You can add a message filter to your application using the statement
Application.AddMessageFilter(instance of IMessageFilter)
. In the example below, the ImessageFilter interferace is implemented by the form containing the AXWebrowser control. As the filter is application wide, it is added/removed when the form activates/deactivates.