I made a game with multiple forms in C#
The game use picturebox and button
I use key down event in form with arrow key to make picturebox move…
The problem occur when I click a button that display hidden groupbox.
The button get a focus and when I press my keys to move the picturebox, the picturebox doesn’t move. But the focus ring in button move to another button when I press my keys.
I tried clicking my form, set this.focus() and this.select in button click
But nothing above work..
Please help me, this game must be done this saturday.
Sounds like homework 🙂
This will catch all your key presses, regardless of what control has focus.