DTE2.MainWindow 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取一个表示主开发环境窗口的 Window 对象。
public:
property EnvDTE::Window ^ MainWindow { EnvDTE::Window ^ get(); };
public:
property EnvDTE::Window ^ MainWindow { EnvDTE::Window ^ get(); };
[System.Runtime.InteropServices.DispId(204)]
public EnvDTE.Window MainWindow { [System.Runtime.InteropServices.DispId(204)] get; }
[<System.Runtime.InteropServices.DispId(204)>]
[<get: System.Runtime.InteropServices.DispId(204)>]
member this.MainWindow : EnvDTE.Window
Public ReadOnly Property MainWindow As Window
属性值
Window 对象。
实现
- 属性
示例
Sub MainWindowExample()
MsgBox(DTE2.MainWindow.Caption)
End Sub
注解
主环境窗口不同于环境中的其他窗口。 例如,尽管其 Kind 属性的类型不是 vsWindowKindLinkedWindowFrame ,但它包含链接的窗口。
您可以通过在窗口的集合中添加和删除 windows,在环境窗口中停靠和取消停靠窗口 LinkedWindows 。
LinkedWindows集合是停靠在主环境窗口边的窗口的集合。 如果两个窗口停靠在一起但未附加到 MainWindow ,则它们不会出现在此集合中。