我用箭头键控制picturebox1,当我进入picturebox2(或label2)时,我需要知道picturebox1是否进入了picturebox2并将picturebox1直接从picturebox2中取出。 (我知道mouseEnter就知道了。)
这是我移动picturebox1的代码(如果有帮助的话):
int x = picturebox1.Location.X;
int y = covjek.Location.Y;
if (e.KeyCode == Keys.Right) x += 3;
else if (e.KeyCode == Keys.Left) x -= 3;
else if (e.KeyCode == Keys.Up) y -= 3;
else if (e.KeyCode == Keys.Down) y += 3;
谢谢!