本文介绍了如何更改光标图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有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[^]
更多推荐
如何更改光标图标?
发布评论