|
-
Mar 31st, 2006, 07:29 AM
#1
Thread Starter
New Member
[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
Last edited by ezhost; Mar 31st, 2006 at 07:57 PM.
-
Mar 31st, 2006, 02:28 PM
#2
Frenzied Member
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.
~Peter

-
Mar 31st, 2006, 02:33 PM
#3
Hyperactive Member
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.
-
Mar 31st, 2006, 02:41 PM
#4
Frenzied Member
Re: [2005] Diable Right click
I don't see any "RightClick" events for the WebBrowser control.
~Peter

-
Mar 31st, 2006, 02:46 PM
#5
Hyperactive Member
Re: [2005] Diable Right click
....
 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.
-
Mar 31st, 2006, 02:58 PM
#6
Hyperactive Member
Re: [2005] Diable Right click
-
Mar 31st, 2006, 05:09 PM
#7
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|