Partager via


DTE2.MainWindow Property

Definition

Gets a Window object representing the main development environment 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

Property Value

A Window object.

Implements

Attributes

Examples

Sub MainWindowExample()  
  MsgBox(DTE2.MainWindow.Caption)  
End Sub  

Remarks

The main environment window is distinct from other windows in the environment. For example, although its Kind property is not of type vsWindowKindLinkedWindowFrame, it contains linked windows.

You can dock and undock windows from the environment window by adding and removing windows from its LinkedWindows collection.

The LinkedWindows collection is the collection of windows docked to the sides of the main environment window. If two windows are docked together but not attached to the MainWindow, they do not appear in this collection.

Applies to