Programatically disable Right Click on Textbox

To avoid Right Click on the text box use the following code in either Form Load event or in constructor. Set the ContextMenu of the textbox to new instance of the ContextMenu

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.