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