如何更改光标图标?

编程入门 行业动态 更新时间:2024-10-23 15:19:00
本文介绍了如何更改光标图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有mypionter.cur,我想更改面板上光标的默认形状 怎么做? 谢谢敌人的帮助?

I have mypionter.cur and i would to change default shape of cursor on my panel how can do that?? thanks foe help??

推荐答案

这里是一个示例,我将光标作为资源中的位图. 私有Cursor HandClosed; 在我的形式的构造函数中: Here a sample, I have the cursor as a bitmap in resource. private Cursor HandClosed; In Contstructor of my form: // Create custom cursors Bitmap test = Properties.Resources.HandClose; test.MakeTransparent(Color.Fuchsia); HandClosed = new Cursor(test.GetHicon());

我在面板上使用它,该行发生在鼠标移动事件中,因为我根据其位置更改了光标:

And I use it on a panel, this line is in a mouse move event, because I change the cursor depending on its postion:

panel4.Cursor = HandClosed;

希望这会有所帮助. 还要检查此链接 www.unifycommunity/wiki/index.php?title=Custom_Mouse_Pointer [ ^ ] www.switchonthecode/tutorials/csharp-tutorial-how- to-use-custom-cursors [ ^ ]

Hopefully this helps. Check this links too www.unifycommunity/wiki/index.php?title=Custom_Mouse_Pointer[^] www.switchonthecode/tutorials/csharp-tutorial-how-to-use-custom-cursors[^]

更多推荐

如何更改光标图标?

本文发布于:2023-07-31 07:31:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1256745.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:光标   图标   如何更改

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!