C#实现显示隐藏鼠标箭头的方法详解
用C#实现显示/隐藏鼠标箭头的方法有多种,其中比较简单的是使用Process类调用Mouse.exe程序进行控制。具体实现方式请参考以下代码:
using System.Diagnostics;
// 显示鼠标箭头
Process process = new Process();
process.StartInfo.FileName = "Mouse.exe";
process.StartInfo.Arguments = "show";
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.Start();
// 隐藏鼠标箭头
Process process = new Process();
process.StartInfo.FileName = "Mouse.exe";
process.StartInfo.Arguments = "hide";
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.Start();
用户评论