Control.UseWaitCursor 属性

定义

获取或设置一个值,该值指示是否将等待光标用于当前控件以及所有子控件。Gets or sets a value indicating whether to use the wait cursor for the current control and all child controls.

public:
 property bool UseWaitCursor { bool get(); void set(bool value); };
[System.ComponentModel.Browsable(true)]
public bool UseWaitCursor { get; set; }
member this.UseWaitCursor : bool with get, set
Public Property UseWaitCursor As Boolean

属性值

若要将等待光标用于当前控件以及所有子控件,则为 true;否则为 falsetrue to use the wait cursor for the current control and all child controls; otherwise, false. 默认值为 falseThe default is false.

属性

注解

当执行需要花费大量时间的操作时,请使用等待光标。Use a wait cursor whenever you perform an operation that takes a noticeable amount of time. 但请注意,阻止 UI 线程的操作也会阻止游标更改。However, note that operations that block the UI thread will also block a cursor change. 因此,只有在另一个线程中执行耗时的操作时,才应使用此属性。Therefore, this property should only be used when performing time-consuming operations in another thread. 若要全局和立即更改游标,请参阅 Current 属性。To change the cursor globally and immediately, see the Current property.

适用于