Share via


DTE2.MainWindow Property

Gets a Window object representing the main development environment window.

Namespace:  EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

Syntax

'Declaration
ReadOnly Property MainWindow As Window
'Usage
Dim instance As DTE2 
Dim value As Window 

value = instance.MainWindow
Window MainWindow { get; }
property Window^ MainWindow {
    Window^ get ();
}
function get MainWindow () : Window

Property Value

Type: EnvDTE.Window
A Window object.

Implements

_DTE.MainWindow

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.

Examples

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

.NET Framework Security

See Also

Reference

DTE2 Interface

DTE2 Members

MainWindow Overload

EnvDTE80 Namespace