Tuesday, June 27, 2006

How to disable right click in Ms WebBrowser Control of VB/C#.NET 2005

I have researched a lot about disabling the right click in web browser control for C# and VB.NET 2005 lot but i have found a simple solution.

It has a property called IsWebBrowserContextMenuEnabled just set it to False. It will disable the right click in web browser control.

Isn't that easy. Stay tuned for more!!


  1. Thanks for the Info M8, you saved me a heap of time


  2. Wow, all the other ways are so complicated. What a great tip.

  3. tanx
    how disable the refresh (f5) ??

  4. Too bad this doesn't apply to objects within the control (specifically flash) :(

  5. Thanks for the post, saved my butt. Just in case anyone wants to disable the keyboard shortcuts, that can be achieved using the property WebBrowserShortcutsEnabled

  6. Is it possible to block Shift+LeftClick? Thanks

  7. To disable Shift+Left click use the following:

    private void webBrowser1_NewWindow(object sender, CancelEventArgs e){ e.Cancel = true;}

  8. Hi, Is there any way to disable right click in WPF applications? I researched and couldnt find any solution, except that we need to host winforms and then use the property. Please help.


Your feedback is very important to me. Please provide your feedback via putting comments.

Search This Blog
About Me
My Photo

Full Stack Developer, Blogger, Microsoft Mvp, Mentor, Lifelong learner, 12+ Years of Experience for JavaScript, web and Microsoft technologies. ASP.NET MVC/Core, C#, Angular,Vue.js and node.js
Subscribe to my blog


My You tube channel- Please Subscribe
Youtube Video Playlist
My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews