游戏开发 XNAGame-006 鼠标事件
文章目录
form1.aspx
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace XNAGame_006
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//鼠标事件
private void Form1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left && e.Clicks >= 2)
{
label1.Text = "X:" + e.X.ToString() + ",Y:" + e.Y.ToString();
}
}
}
}【H5游戏开发】
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论