共用方式為


WaitCursor 類別

當執行個體存在時顯示等待游標,當其遭到處置時還原原來的指標。

繼承階層架構

System.Object
  Microsoft.VisualStudio.Modeling.Shell.WaitCursor

命名空間:  Microsoft.VisualStudio.Modeling.Shell
組件:  Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0 (在 Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0.dll 中)

語法

'宣告
Public NotInheritable Class WaitCursor _
    Implements IDisposable
public sealed class WaitCursor : IDisposable

WaitCursor 類型會公開下列成員。

建構函式

  名稱 描述
公用方法 WaitCursor 只要將滑鼠指標移至指定的使用者介面控制項,就儲存目前的游標並顯示等待游標,。當處置執行個體時,將會還原目前的游標。

回頁首

方法

  名稱 描述
公用方法 Clear 還原原始游標。通常不需要明確地呼叫這個方法。
公用方法 Dispose 還原原始游標。這會自動在 using 區塊的結尾發生。
公用方法 Equals 判斷指定的物件是否等於目前物件。 (繼承自 Object)。
受保護的方法 Finalize 確認處置物件時游標已清除。 (覆寫 Object.Finalize()。)
公用方法 GetHashCode 做為預設雜湊函式。 (繼承自 Object)。
公用方法 GetType 取得目前執行個體的 Type。 (繼承自 Object)。
公用方法 ToString 傳回表示目前物件的字串。 (繼承自 Object)。

回頁首

備註

這個類別是專為與「Using」陳述式。 在下列範例中,等待游標,便會出現在封閉區塊中實作時,每當滑鼠,在指定的控制項。

範例

using (WaitCursor w = new WaitCursor(control)) 
{/* wait cursor displayed over control while execution is in here */}

執行緒安全

這個類型的任何 Public static (在 Visual Basic 中為 Shared) 成員都是安全執行緒。不保證任何執行個體成員是安全執行緒。

請參閱

參考

Microsoft.VisualStudio.Modeling.Shell 命名空間