IUIService.ShowToolWindow(Guid) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
顯示指定的工具視窗。
public:
bool ShowToolWindow(Guid toolWindow);
public bool ShowToolWindow(Guid toolWindow);
abstract member ShowToolWindow : Guid -> bool
Public Function ShowToolWindow (toolWindow As Guid) As Boolean
參數
- toolWindow
- Guid
工具視窗的 Guid 識別碼。 這可以是自訂Guid值,也可以是從 中預定義的值之一。StandardToolWindows
傳回
true 如果工具視窗成功顯示; false 如果無法展示或找到。
範例
以下程式碼範例嘗試取得 並 IUIService 呼叫服務 ShowToolWindow 方法的實例。
IUIService^ UIservice = dynamic_cast<IUIService^>(this->GetService( System::Windows::Forms::Design::IUIService::typeid ));
if ( UIservice != nullptr )
UIservice->ShowToolWindow( StandardToolWindows::TaskList );
IUIService UIservice = (IUIService)this.GetService(
typeof( System.Windows.Forms.Design.IUIService ) );
if( UIservice != null )
UIservice.ShowToolWindow(StandardToolWindows.TaskList);
Dim UIservice As IUIService = CType(Me.GetService( _
GetType(System.Windows.Forms.Design.IUIService)), IUIService)
If (UIservice IsNot Nothing) Then
UIservice.ShowToolWindow(StandardToolWindows.TaskList)
End If