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!!
Share:

9 comments:

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

    Cheers
    Acestu

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

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

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

    ReplyDelete
  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

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

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


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

    ReplyDelete
  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.

    ReplyDelete

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

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews