don´t need the ContextMenu

How can i stop the context menu from showing when press the mouse right boton ?

thanks.


1 Reply

MS Malini Selvarasu Syncfusion Team April 7, 2025 12:47 PM UTC

Hi Ricardo Abranches,

Based on the information provided, we understand that you want to prevent the ContextMenu from appearing on a right-click. This can be achieved by setting e.Cancel = true within the ContextMenuStrip.Opening event, which effectively disables the display of the ContextMenu.

To further assist you, we have prepared a sample demonstrating this approach. Please review the sample along with the accompanying code snippet, and let us know if this solution meets your requirements.
Code Snippet:
this.scheduleControl1.GetScheduleHost().ContextMenuStrip.Opening += ContextMenuStrip_Opening;
// Event Customization
private void ContextMenuStrip_Opening(object? sender, System.ComponentModel.CancelEventArgs e)
{
     e.Cancel = true;
}
Regards,
Malini Selvarasu

Attachment: WinForms_ScheduleControl_b6f470b7.zip

Loader.
Up arrow icon