开发者

Can I have/use Cursor.Postion in float? OR smooth cursor movement?

开发者 https://www.devze.com 2023-03-29 06:38 出处:网络
I am using Cursor.Position property to manipulate the position of the cursor in my program. It uses the integer datatype and the movement of the cursor is not smooth; it seems jerky...

I am using Cursor.Position property to manipulate the position of the cursor in my program. It uses the integer datatype and the movement of the cursor is not smooth; it seems jerky...

Is there a way to use single or floating datatypes?

开发者_运维知识库My sole purpose is to have smooth cursor movement in real time, that is, no simlulations...


The jerkiness is not a result of it being an int, as the cursor can only be at a particular pixel location on the screen; having floating-point precision would be wasted, since the cursor can't be in between pixels.

The jerkiness is likely coming from whatever timing mechanism you're using to perform the movement. Can you share that code with us?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号