WinForms cursor hidden only on one Form

前端 未结 5 578
渐次进展
渐次进展 2021-01-21 02:40

I have a C# application with 2 simultaneous visible forms, and I need to hide mouse cursor when it is over only on one of them. If I use Cursor.Hide() it applies the change for

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-21 03:43

    You can make a "blank" cursor, and set myForm.Cursor = blankCursor; This will make that specific form show a specific cursor, which could be completely transparent.

提交回复
热议问题