运用button的MouseDown事件,来判断是点了鼠标左键或右键,例子如下:
- private void button1_MouseDown(object sender, MouseEventArgs e)
- {
- if (e.Button == MouseButtons.Left)
- {
- MessageBox.Show("left");
- }
- else
- {
- MessageBox.Show("right");
- }
- }

![[手游] 三网H5小游戏【少年仙路】WIN系服务端+Linux手工服务端+详细搭建教程](https://cdn.jxasp.com:9143/image/20260615/136BC33AA47EB0D84E878835A8B38FDB.png)

















