次の方法で共有


ToolWindows.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(1)]
public EnvDTE.DTE DTE { [System.Runtime.InteropServices.DispId(1)] get; }
[<System.Runtime.InteropServices.DispId(1)>]
[<get: System.Runtime.InteropServices.DispId(1)>]
member this.DTE : EnvDTE.DTE
Public ReadOnly Property DTE As DTE

Property Value

DTE

A DTE object.

Attributes

Examples

This example demonstrates how to reach the parent DTE object through the TollWindows object.

Imports EnvDTE  
Imports EnvDTE80  
Public Sub CommandWindowManip(ByVal dte As DTE2)  
    Dim myCmd As CommandWindow  
    myCmd = _applicationObject.ToolWindows.CommandWindow  
    MsgBox("The command count, obtained through the parent DTE object _  
    , is : " & myCmd.DTE.Commands.Count)  
End Sub  
using EnvDTE;  
using EnvDTE80;  
using System.Windows.Forms;  
public void CommandWindowManip (DTE2 dte)  
{  
    CommandWindow myCmd;  
    myCmd = _applicationObject.ToolWindows.CommandWindow;  
    MessageBox.Show("The command count, obtained through the parent  
 DTE object, is : " + myCmd.DTE.Commands.Count);  
}  

Remarks

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

Applies to