Export (0) Print
Expand All
ID
Top
Expand Minimize
This topic has not yet been rated - Rate this topic

MainWindow Property

Visual Studio .NET 2003

Returns a Window Object representing the main development environment window.

[Visual Basic .NET]
Public ReadOnly Property MainWindow() As Window
[Visual Basic 6]
Property Get MainWindow() As Window
[C++]
HRESULT __stdcall get_MainWindow(
   /* [out, retval] */ Window** retVal
);
[C#]
public Window MainWindow {get;}
[JScript .NET]
public function get MainWindow() : Window

Return Value

Returns a Window object.

Remarks

The main environment window is distinct from other windows in the environment. For example, even though 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 in any way to the MainWindow, they do not appear in this collection.

Example

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

See Also

Applies To: DTE Object

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.