Live Chat Icon For mobile
Live Chat Icon

How do I disable the default context menu of a textbox?

Platform: WinForms| Category: Menus

To prevent the default context menu of a TextBox from showing up, assign a empty context menu as shown below:


[C#]
textBox1.ContextMenu = new ContextMenu();

[VB.Net]
textBox1.ContextMenu = New ContextMenu()

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.