Serialcoder en Français Serialcoder in English
TEL : +33 (0)9 72 13 15 17

Windows Forms FAQ resources

10. Windows Forms Menus

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


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()