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.

適用於