Windows2.Parent Property

Definition

Gets the immediate parent object of a Windows2 collection.

public:
 property EnvDTE::DTE ^ Parent { EnvDTE::DTE ^ get(); };
public:
 property EnvDTE::DTE ^ Parent { EnvDTE::DTE ^ get(); };
[System.Runtime.InteropServices.DispId(302)]
public EnvDTE.DTE Parent { [System.Runtime.InteropServices.DispId(302)] get; }
[<System.Runtime.InteropServices.DispId(302)>]
[<get: System.Runtime.InteropServices.DispId(302)>]
member this.Parent : EnvDTE.DTE
Public ReadOnly Property Parent As DTE

Property Value

DTE

A DTE object.

Implements

Attributes

Examples

This example displays the file name of the Parent object.

Imports EnvDTE  
Imports EnvDTE80  
Sub GetParentFileName(ByVal dte As DTE2)  
    Dim win As Windows2  
    win = CType(_applicationObject.Windows, EnvDTE80.Windows2)  
    MsgBox("The file name of the Windows parent object is: " & vbCr _  
    & win.Parent.FileName)  
End Sub  
using EnvDTE;  
using EnvDTE80;  
using System.Windows.Forms;  
public void GetParentFileName(DTE2 dte)  
{  
    Windows2 win;  
    win = (EnvDTE80.Windows2)_applicationObject.Windows;  
    MessageBox.Show("The file name of the Windows parent object is: "   
+ "\n" + win.Parent.FileName);  
}  

Remarks

The Parent property returns the immediate parent to the object or collection.

Applies to