Articles in this section
Category / Section

How to suppress the context menu on right-click of the WinForms DateTimePicker (DateTimePickerAdv)?

1 min read

Context menu

We can suppress the context menu through the following code snippet:

C#

this.dateTimePickerAdv1.ContextMenu = new ContextMenu(new MenuItem[] {});

 

VB

Me.dateTimePickerAdv1.ContextMenu = New ContextMenu(New MenuItem() {})

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied