简体   繁体   中英

C# Visual Studio 2008 NumericUpDown PopUp Menu Removal

MenuPic

Greetings. I am using the NumericUpDown control on my application. When I right click mouse on any of these controls the popup menu shows up as displayed in the above link.

How do I remove this menu please?

Thanks.

You can assign an empty context menu to the controls

ContextMenu contextMenu = new ContextMenu();
this.numericUpDown1.ContextMenu = contextMenu;
this.numericUpDown2.ContextMenu = contextMenu;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM