private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.A)
{
if (pbMainBox.Location == PictureBox.Location)
{
// I leave this if blank because I don't want to do anything when I press A
}
else
{
// here in else I like if it anywhere it can move
// but if it in the PictureBox location it can't move
pbMainBox.Location = new Point(pbMainBox.Location.X -2, pbMainBox.Location.Y);
}
}
}
pbmainBox is my main box and what I name it PictureBox it's the border