成都创新互联网站制作重庆分公司

C#隐藏、显示鼠标指针

1、添加命名空间

创新互联公司是一家专业提供南平企业网站建设,专注与网站建设、成都网站建设、H5技术、小程序制作等业务。10年已为南平众多企业、政府机构等服务。创新互联专业网站设计公司优惠进行中。

using System.Runtime.InteropServices;

2、添加DLL引用

/// 
/// 控制鼠标指针显示和隐藏
/// 
public class MousePointer
{
    /// 
    /// 调用系统API函数操作鼠标指针
    /// 
    /// 0表示隐藏鼠标指针,1表示显示鼠标指针
    [DllImport("user32.dll", EntryPoint = "ShowCursor", CharSet = CharSet.Auto)]
    public static extern void ShowCursor(int status);
}``

名称栏目:C#隐藏、显示鼠标指针
链接URL:http://cxhlcq.com/article/jshdog.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部