设置等待光标而不引用主窗体。 [英] Setting Wait cursor without a reference to main form.

查看:58
本文介绍了设置等待光标而不引用主窗体。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我正在尝试将沙漏光标设置在一个没有任何东西的类中,而不是
与MainForm类有关,我不会我想传递一个引用

MainForm。


如何将当前光标设置为Hourglass然后再返回箭头?


非常感谢,


Alberto

Hi All,

I am trying to set the hourglass cursor inside a class that has nothing
to do with MainForm class and I don''t want to pass a reference to
MainForm.

How can I set the current cursor to Hourglass and then back to arrow?

Thanks a lot,

Alberto

推荐答案

您好Alberto ,
您可以在2.0框架中使用Application.UseWaitCursor属性。


-

Dave Sexton


< in ** @ devdept.comwrote in message

news:11 **************** ******@j72g2000cwa.googlegr oups.com ...
Hi Alberto,

You can use the Application.UseWaitCursor property in the 2.0 framework.

--
Dave Sexton

<in**@devdept.comwrote in message
news:11**********************@j72g2000cwa.googlegr oups.com...

大家好,


我正在尝试将沙漏光标设置在一个没有任何东西的类中,而且我不想传递给
MainForm的引用。

MainForm。


如何将当前光标设置为Hourgla ss然后回到箭头?


非常感谢,


Alberto
Hi All,

I am trying to set the hourglass cursor inside a class that has nothing
to do with MainForm class and I don''t want to pass a reference to
MainForm.

How can I set the current cursor to Hourglass and then back to arrow?

Thanks a lot,

Alberto



>您可以在2.0框架中使用Application.UseWaitCursor属性。


右键,或使用Cursor.Current进行全局设置。 />
Oliver Sturm

-
http://www.sturmnet.org/blog
>You can use the Application.UseWaitCursor property in the 2.0 framework.

Right, or use Cursor.Current for a global setting.
Oliver Sturm
--
http://www.sturmnet.org/blog


嗨奥利弗,


嗯,有''一个微妙的区别:


"设置当前属性会更改当前显示的光标。

应用程序可能会也可能不会继续监听鼠标事件。在

长时间运行操作期间,应用程序不应响应鼠标事件的信号

,请使用UseWaitCursor属性。


Cursor.Current属性
$ b $b§备注
http://msdn2.microsoft.com/en-us/lib...r.current.aspx


-

Dave Sexton


" Oliver Sturm" < ol **** @ sturmnet.org写信息

news:xn **************** @ msnews.microsoft.com ...
Hi Oliver,

Well, there''s a subtle difference:

"Setting the Current property changes the cursor currently displayed. The
application may or may not continue to listen for mouse events. To signal
that the application should not respond to mouse events during a
long-running operation, use the UseWaitCursor property."

Cursor.Current Property
§ Remarks
http://msdn2.microsoft.com/en-us/lib...r.current.aspx

--
Dave Sexton

"Oliver Sturm" <ol****@sturmnet.orgwrote in message
news:xn****************@msnews.microsoft.com...

您可以在2.0框架中使用Application.UseWaitCursor属性。
You can use the Application.UseWaitCursor property in the 2.0 framework.



对,或者使用Cursor.Current进行全局设置。


Oliver Sturm

-
http://www.sturmnet.org/blog



这篇关于设置等待光标而不引用主窗体。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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