如何在(C#)中创建自定义光标

拉德克·塔兰特(Radek Tarant)

如何为我的应用程序创建自定义光标。

这是我的光标:

自定义光标

我的实际脚本:

public BasePreview()
{
    InitializeComponent();
    Bitmap bitmap = global::testCursor.Properties.Resources.Cursor1;
    Cursor cursor = new System.Windows.Forms.Cursor(bitmap.GetHbitmap());
    this.Cursor = cursor;
}

问题:

将鼠标悬停在程序上。所以我的光标看起来像是waitCursor。你能帮我吗?

沙美尔
System.IO.MemoryStream cursorMemoryStream = new System.IO.MemoryStream(Properties.Resources.Cursor1);
Cursor mCursor = new Cursor(cursorMemoryStream);
this.Cursor = mCursor;

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章