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?
Asked
Active
Viewed 346 times
1 Answers
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
-
It still lets me paste...THIS DOES NOT WORK! – Mar 28 '14 at 21:20