Aracılığıyla paylaş


Windows2.Parent Özellik

Hemen üst nesnesi alır bir Windows2 koleksiyonu.

Ad alanı:  EnvDTE80
Derleme:  EnvDTE80 (EnvDTE80.dll içinde)

Sözdizimi

'Bildirim
ReadOnly Property Parent As DTE
DTE Parent { get; }
property DTE^ Parent {
    DTE^ get ();
}
abstract Parent : DTE
function get Parent () : DTE

Özellik Değeri

Tür: EnvDTE.DTE
DTE nesnesi

Notlar

Parent Özelliği hemen üst nesne veya koleksiyon döndürür.

Örnekler

Bu örnek dosya adını görüntüler Parent nesne.

Bu örnek, bir eklenti çalıştırma hakkında daha fazla bilgi için bkz: Nasıl yapılır: derlemek ve Otomasyon nesne modeli kod örneklerini çalıştırmak.

Imports EnvDTE
Imports EnvDTE80
Public Sub OnConnection(ByVal application As Object, _
 ByVal connectMode As ext_ConnectMode, ByVal addInInst As Object, _
 ByRef custom As Array) Implements IDTExtensibility2.OnConnection
    _applicationObject = CType(application, DTE2)
    _addInInstance = CType(addInInst, AddIn)
    GetParentFileName(_applicationObject)
End Sub
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 OnConnection(object application, 
ext_ConnectMode connectMode, object addInInst, ref Array custom)
{
    _applicationObject = (DTE2)application;
    _addInInstance = (AddIn)addInInst;
    GetParentFileName(_applicationObject);
}
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);
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

Windows2 Arabirim

Parent Fazla Yük

EnvDTE80 Ad Alanı

Diğer Kaynaklar

Nasıl yapılır: derlemek ve Otomasyon nesne modeli kod örneklerini çalıştırmak