c#使用鼠标移动图片框

时间:2019-06-01 18:15:37

标签: c# .net

我正在尝试使用鼠标移动pictureBox。而且我不知道。到目前为止,这是我的代码,我真的迷路了:

Timer getPos = new Timer();
getPos.Interval = (1); // i am aware that that is not a second
getPos.Tick += new EventHandler(GetPos_Tick);
GetPos.Start();

private void GetPos_Tick(object sender, EventArgs e)
   {
       player.Location = new Point(player.PointToScreen);
   }

0 个答案:

没有答案