日期:2014-05-17 浏览次数:20892 次
//里面的窗体事件不知道为什么触发不了
private void frmMain_KeyDown(object sender, KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Up:
State = Direction.up;
break;
case Keys.Down:
State = Direction.down;
break;
case Keys.Left:
State = Direction.left;
break;
case Keys.Right:
State = Direction.right;
break;
}
}