所以默认光标是“箭头”光标,箭头的左上角(点所在)是点击或与其他控件交互的部分。我怎样才能改变指向部分说出箭头的尾部?
我有一个自定义光标(位图图像),它是一个 16x16 大小的圆圈,我希望它的正中心成为指针。我有另一个类似箭头的自定义光标,它也指向左下方 16x16,我希望光标的左下角成为指针。我认为游标类中有一个属性用于此,但我不确定它叫什么。
最佳答案
这实际上是在 CUR
中指定的 file format .
The CUR file format is an almost identical image file format for non-animated cursors in Microsoft Windows. The only differences between these two file formats are the bytes used to identify them and the addition of a hotspot in the CUR format header; the hotspot is defined as the pixel offset (in x,y coordinates) from the top-left corner of the cursor image where the user is actually pointing the mouse.
可以编辑 CUR
文件的程序通常允许您指定热点。更多信息可以在 this question 中找到.
关于C# 更改光标的点击/指向位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6797884/