Invisible ContextMenu while Right click on the TextBox..

Assume that you are using multiline textbox with readonly in your application. After set that property readonly, you cannot change the value in the textbox. But if you right click on the textbox, the context menu will displayed with Copy, Paste, Select All, etc. In case if you doesn't want that context menu while right clicking on the text box, just create an instance for ContextMenu.

ex: txtName.ContextMenu = new ContextMenu();


No responses found. Be the first to comment...

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: