//定义个常量步长为L,我赋值是2(你可以随便赋值)
const int L = 2;
//Form里面的一个事件KeyDown,在Form里面用了个lable(里面随便写几个字)我取名叫lblQ
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Up)
{
this.lblQ.Location = new Point(this.lblQ.Location.X, this.lblQ.Location.Y - L);
}
if (e.KeyCode == Keys.Down)
{
this.lblQ.Location = new Point(this.lblQ.Location.X, this.lblQ.Location.Y + L);
}
if (e.KeyCode == Keys.Left)
{
this.lblQ.Location = new Point(this.lblQ.Location.X - L, this.lblQ.Location.Y);
}
if (e.KeyCode == Keys.Right)
{
this.lblQ.Location = new Point(this.lblQ.Location.X + L, this.lblQ.Location.Y);
}
}
还是帮你写下吧!呵呵!我调试过了可以的!