-1

I am asking someone here to add in a override to disable right clicking the control, and if that is not possible, would it be possible to just disable pasting?

1 Answers1

1

See p.campbell's answer to how to disable copy, Paste and delete features on a textbox using C#

public CueComboBox(): base()
{
    //disable right click menu
    ContextMenu = new ContextMenu();
}

private const Keys PasteKeys = Keys.Control | Keys.V;

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
    if (keyData == PasteKeys)
    {
        return true;
    }
    else
    {
        return base.ProcessCmdKey(ref msg, keyData);
    }
}
Community
  • 1
  • 1
Clint Good
  • 820
  • 6
  • 14