How to get the position of a Click?

后端 未结 3 583
终归单人心
终归单人心 2020-12-06 04:51

I\'m currently making a game where the player will click on one of his units (which are pictureboxes) and a circle will become visible with the player\'s unit in the center.

3条回答
  •  时光取名叫无心
    2020-12-06 05:28

    use the MouseClick event of the PictureBox for this sort of thing...

    see
    http://msdn.microsoft.com/en-us/library/system.windows.forms.picturebox.aspx
    http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mouseclick.aspx
    http://msdn.microsoft.com/en-us/library/system.windows.forms.mouseeventargs.aspx

提交回复
热议问题