[2005] Disable Right click
I am using a web browser control in visual basic .NET 2005 and i want to stop people from right click when browsing WebPages. This can either disable right click for the whole form or just the web browser it doesn't really matter. Could someone tell me the code to do this.
Thanks
Re: [2005] Diable Right click
I've only seen this done via code in the HTML page.
I'm not sure if it can be done in the control or not.
Re: [2005] Diable Right click
im not sure, and this isnt the code, but wouldnt it be something similar to:
VB Code:
Private Sub WebBrowser1_RightClick() Handles WebBrowser1.mousedown.right
messagebox.show("Disabled", "Error")
end sub
Dont take that literally because i dont know, but i think its something along those lines.
Re: [2005] Diable Right click
I don't see any "RightClick" events for the WebBrowser control.
Re: [2005] Diable Right click
....
Quote:
Originally Posted by francisstokes
im not sure, and this isnt the code, but wouldnt it be something similar to:
Dont take that literally because i dont know, but i think its something along those lines.
Re: [2005] Diable Right click
Re: [2005] Diable Right click
I think you have to subclass the window
Or if you just want to disable the context menu
VB Code:
WebBrowser1.IsWebBrowserContextMenuEnabled = False