如何更改光标图像 [英] How to change image for cursor

查看:105
本文介绍了如何更改光标图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


如何更改光标图像.
当我使用

Hi,
How to change the image for cursor.
when i use

panel1.Cursor = new Cursor(GetType(), "in.cur");



它显示为"Object reference not set to an instance of an object"的异常.

当我这样使用时



Its showing exception as "Object reference not set to an instance of an object".

when i use like this

panel1.Cursor = new Cursor("zoom-in.cur");



它显示异常为"Image format is not valid. The image file may be corrupted.Parameter name: stream".

如何使用它.



It showing exception as "Image format is not valid. The image file may be corrupted.Parameter name: stream".

How to use it.

推荐答案

选中此

http://www.switchonthecode.com/tutorials/csharp-tutorial-how- to-use-custom-cursors [ ^ ]
check this

http://www.switchonthecode.com/tutorials/csharp-tutorial-how-to-use-custom-cursors[^]


请参阅以下内容:

http://stackoverflow.com/questions/1175870/how-can- i-change-the-mouse-cursor-image [ ^ ]

http://www.imagingcontrol.com/en_US/library/dotnet/cursor-on -ic-window/ [ ^ ]
Refer these:

http://stackoverflow.com/questions/1175870/how-can-i-change-the-mouse-cursor-image[^]

http://www.imagingcontrol.com/en_US/library/dotnet/cursor-on-ic-window/[^]


看看这个论坛的讨论,讨论并解决了相同的问题.
http://www.rw-designer.com/forum/1237 [
Take a look at this forum discussion, same issue is discussed and resolved.
http://www.rw-designer.com/forum/1237[^]


这篇关于如何更改光标图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆