Udostępnij za pośrednictwem


Windows2.DTE Property

Definition

Gets the top-level extensibility object.

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

Property Value

DTE

A DTE object.

Implements

DTE
Attributes

Examples

This example accesses the DTE object through a Windows2 object to display the name of the IDE.

Imports EnvDTE  
Imports EnvDTE80  
Sub ReachDTE(ByVal dte As DTE2)  
    Dim win As Windows2  
    win = CType(_applicationObject.Windows, EnvDTE80.Windows2)  
    MsgBox("The DTE name, reached through the Window2 object, is: " _  
 & vbCr & win.DTE.Name)  
End Sub  
using EnvDTE;  
using EnvDTE80;  
using System.Windows.Forms;  
public void ReachDTE(DTE2 dte)  
{  
    Windows2 win;  
    win = (EnvDTE80.Windows2)_applicationObject.Windows;  
    MessageBox.Show("The DTE name, reached through the Window2 object,  
 is: " + "\n" + win.DTE.Name);  
}  

Remarks

In Visual Studio, the DTE object is the root of the automation model, which other object models often call "Application".

Applies to