Hello Mat

 找回密码
 立即注册
查看: 5701|回复: 7

C#显示和隐藏鼠标

[复制链接]

84

主题

115

帖子

731

金钱

管理员

Rank: 9Rank: 9Rank: 9

积分
1467
发表于 2020-4-25 17:01:53 | 显示全部楼层 |阅读模式
C#显示和隐藏鼠标:https://blog.csdn.net/weixin_30622107/article/details/101509206
  1. [DllImport("user32", EntryPoint = "ShowCursor")]
  2. public extern static bool ShowCursor(bool show);
  3. private void button1_Click(object sender, EventArgs e)
  4. {
  5.       ShowCursor(false);//隐藏鼠标
  6. }

  7. private void button2_Click(object sender, EventArgs e)
  8. {
  9.      ShowCursor(true);//显示鼠标
  10. }
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Python|Opencv|MATLAB|Halcom.cn ( 蜀ICP备16027072号 )

GMT+8, 2024-4-23 23:10 , Processed in 0.222196 second(s), 24 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表