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

问题描述

如何将光标图标更改为通常在桌面上显示的忙图标?如何设置动画文件(.gif,.ani)而不是光标?

解决方案

尝试执行以下操作: p>

  System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor; 

有关详细信息,请访问



游标类不支持GIF文件或动画光标(.ANI)。您可以加载自定义光标执行

  Cursor.Current = new Cursor(C:\\ic.cur) ;也许你可以使用像。此外,还有另一个线程与之相关。




How to change cursor icon to the 'busy icon' usually shown on the desktop? How can i set Animated files (.gif,.ani) instead of cursor ?

解决方案

Try to do the following:

System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;

More information is available at Cursors Class documentation

Cursor class doesn't support GIF files or animated cursors (.ANI). You can load a custom cursor doing

Cursor.Current = new Cursor("C:\\ic.cur");

Maybe you can convert yout GIF file to cursor format using a tool like Microangelo. In addition, there is another thread related to it.

How do you convert a GIF into a CUR file?

这篇关于C#Winforms - 更改鼠标的光标图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 20:56