更改自定义光标的热点 [英] change hotspot of a custom cursor

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

问题描述

我正在使用以这种方式加载的自定义游标:

I'm using a custom cursor that I loaded in this way:

Bitmap bit = new Bitmap(path);
cur = new Cursor(bit.GetHicon());
Cursor.current = cur;

我的位图是一个44x58 png,鼠标热点不是我想要的地方。我寻找一个属性来更改鼠标热点,但我发现只有一个是只读( cur.Hotspot )。

my bitmap is a 44x58 png and the mouse hot spot is not exactly where I want to be. I looked for a property to change the mouse hot spot but the only one I found is readable-only (cur.Hotspot). What I need to do for change its coordinates?

感谢

推荐答案

在Visual Studio中,在图像编辑器中打开光标文件或资源,然后从工具栏中选择热点工具。然后单击新的热点并保存文件。 AFAIK没有办法通过.NET API设置热点,但是有通过WIN32 API的选项,如其他人的评论中的链接所示。

In Visual Studio, open the cursor file or resource in the image editor and select the Hotspot Tool from the toolbar. Then click on the new hotspot and save the file. AFAIK there is no way to set the hotspot via the .NET API, but there are options via the WIN32 API, as demonstrated in the links in the others' comments.

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

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