的WinForms光标只隐藏在一个表单 [英] WinForms cursor hidden only on one Form
本文介绍了的WinForms光标只隐藏在一个表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有2个同时可见形式的C#应用程序,我需要隐藏鼠标光标当它结束时只对其中的一个。如果我使用Cursor.Hide()它同时适用于他们的变化。
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 both of them.
推荐答案
您可以做一个空白光标,并设置 myForm.Cursor = blankCursor;
这将使该特定形式显示特定光标,这可能是完全透明的。
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.
这篇关于的WinForms光标只隐藏在一个表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文