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 code above, I cannot write to a TextBox. Is there a solution for this?
After you have processed everything, pass it 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 return true , it means that the input has been processed and it will not be passed to the next control, return false and it should work as you expect.
true
false
Link
Source: https://habr.com/ru/post/1403573/More articles:Why do I get "can't allocate an array with constant size 0"? - c ++VBA-Loop with some sheets - loopsAndroid: how to resume application / activity from BroadcastReceiver? - androidCan I smooth the hierarchy of objects in the Locales window? - c #how to execute a function before each new request is passed to the controller in grails - grailsServer Processing - coldfusionRaphaelJS huge slowdowns in IE8 when editing attr () and text () (fill, stroke, weight) elements - internet-explorer-8Location from Wi-Fi data - pythontypedef template C ++ 0x - c ++How to add encoder for socket application - logbackAll Articles