I respond to the KeyPress and KeyDown events in the Form. Why ca n’t I trigger the event when I press the keyboard? Sometimes I do n’t know what ’s going on.
If it is KeyPress, some keys will not respond to the event, such as arrow keys and auxiliary keys.
But KeyDown should not be like this? As long as the keys on the keyboard will respond to this event, I do n’t know which event you are using
I think there should be something wrong with the explanation of the landlord:
These should be two trigger events, not just a matter of the form's [KeyPreview] property:
Explanation:
Assume a response to a keyboard return:
Private Sub Form_KeyPress (KeyAscii As Integer)
if keyascii = 13 then msgbox "Enter"
End Sub