I'm planning on doing a Jump and Run, so I need a moving pictureBox if I press W / A / S / D or something like that. I'm currently using the source code down there.
The Problem I have right now is, that I've got a lot of Buttons, other Picture Frames, text boxes etc in my current Form1 and if I press the button W now, my picture box won't get higher in coordinates because I think one of the other buttons etc is selected, does anybody know how to fix that? I tried the Source code in a new file without any other Buttons textboxes etc and it worked without any problems.
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.W)
{
pictureBox2.Top -= 100;
}
}