VB.NET: In ProcessCmdKey simplest way to determine if a key prints or not?
问题 What's the simplest way to identify whether a keystroke is a printable character (one that should appear in a textbox) or not? I want to separate keys like F1, Home, etc. from those that would actually appear in a textbox. I am trying to avoid a massive IF statement by identifying all the non-printable characters myself. Using an event like KeyUp, KeyPress etc. is not an option due to the design of the control. 回答1: There is no simple way. And you should never put yourself in this spot. The