抓取鼠标形状SnatchAtMouse示例

C# 2022-02-10 22:10:58

抓取鼠标形状SnatchAtMouse示例

抓取鼠标形状示例本实例在开发中有用的可以参考,SnatchAtMouse当鼠标按下起来的时候抓取鼠标形状。
private void Frm_Main_MouseUp(object sender, MouseEventArgs e)
{
Graphics myGraphics = this.CreateGraphics();//创建窗体的Graphics类
Cursor.Draw(myGraphics, new Rectangle(e.X, e.Y, 10, 10));//调用Cursor类的Draw方法抓取鼠标形状
}