다음을 통해 공유


DTE Interface

Definition

The top-level object in the Visual Studio automation object model. The documentation for the _DTE type is the most complete.

public interface class DTE : EnvDTE::_DTE
public interface class DTE
public interface class DTE : EnvDTE::_DTE
__interface DTE : EnvDTE::_DTE
[System.Runtime.InteropServices.CoClass(typeof(EnvDTE.DTEClass))]
[System.Runtime.InteropServices.Guid("04A72314-32E9-48E2-9B87-A63603454F3E")]
public interface DTE : EnvDTE._DTE
[System.Runtime.InteropServices.Guid("04A72314-32E9-48E2-9B87-A63603454F3E")]
[System.Runtime.InteropServices.TypeLibType(4160)]
public interface DTE
[<System.Runtime.InteropServices.CoClass(typeof(EnvDTE.DTEClass))>]
[<System.Runtime.InteropServices.Guid("04A72314-32E9-48E2-9B87-A63603454F3E")>]
type DTE = interface
    interface _DTE
[<System.Runtime.InteropServices.Guid("04A72314-32E9-48E2-9B87-A63603454F3E")>]
[<System.Runtime.InteropServices.TypeLibType(4160)>]
type DTE = interface
Public Interface DTE
Implements _DTE
Public Interface DTE
Derived
Attributes
Implements

Examples

Sub DTEExample()  
    Dim objTextDoc As TextDocument  
    Dim objEP As EditPoint  

    ' Create a new text document.  
    DTE.ItemOperations.NewFile("General\Text File")  
    ' Get a handle to the new document.  
    Set objTextDoc = DTE.ActiveDocument.Object("TextDocument")  
    Set objEP = objTextDoc.StartPoint.CreateEditPoint  
    ' Create an EditPoint and add some text.  
    objEP.Insert "A test sentence."  
End Sub  

Remarks

For details about referencing the EnvDTE namespace and the DTE object, see FAQ: Converting Add-ins to VSPackage Extensions.

Properties

ActiveDocument
ActiveSolutionProjects
ActiveWindow
AddIns
Application
CommandBars
CommandLineArguments
Commands
ContextAttributes
Debugger
DisplayMode
Documents
DTE
Edition
Events
FileName
Find
FullName
Globals
IsOpenFile[String, String]
ItemOperations
LocaleID
Macros
MacrosIDE
MainWindow
Mode
Name
ObjectExtenders
Properties[String, String]
RegistryRoot
SelectedItems
Solution
SourceControl
StatusBar
SuppressUI
UndoContext
UserControl
Version
WindowConfigurations
Windows

Methods

ExecuteCommand(String, String)
GetObject(String)
LaunchWizard(String, Object[])
OpenFile(String, String)
Quit()
SatelliteDllPath(String, String)

Applies to