Reputation: 1395
I have a windows form and an OnKeyPress function. I also have KeyPreview turned on.
The function responds to most keys except up, down, left, right, home, pgdown, end and so on...
It's like whenever I press those keys, it doesn't send them to the form, it just toggles between the buttons and the other controls.
Anyone experienced that and can help out?
Upvotes: 0
Views: 1680
Reputation: 1888
From MSDN
The KeyPress event is not raised by noncharacter keys; however, the noncharacter keys do raise the KeyDown and KeyUp events.
Upvotes: 6