Control.UseWaitCursor Control.UseWaitCursor Control.UseWaitCursor Control.UseWaitCursor Property

定义

获取或设置一个值,该值指示是否将等待光标用于当前控件以及所有子控件。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.

适用于