I have code that overrides the TextBox ProcessCmdKey method:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
switch (keyData)
{
case: //something to do etc etc.
}
return true;
}
But when I use the above code, I can't write in the TextBox. Is there a solution for this?
Once you've handled everything, pass it on to the base control:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
switch (keyData)
{
case /* whatever */:
// ...
default:
return base.ProcessCmdKey(ref msg, keyData);
}
return true;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With