다음을 통해 공유


_DTE Interface

Definition

The top-level object in the Visual Studio automation object model. Refer to _DTE for this functionality. Do not instantiate from this class.

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

Remarks

You can get the DTE automation object by calling GetService in the Initialize method. DTE2 dte = (DTE2)GetService(typeof(DTE));

Properties

ActiveDocument

Gets the active document.

ActiveSolutionProjects

Gets an array of currently selected projects.

ActiveWindow

Returns the currently active window, or the top-most window if no others are active.

AddIns

Gets the AddIns collection, which contains all currently available add-ins.

Application

Microsoft Internal Use Only.

CommandBars

Gets a reference to the development environment's command bars.

CommandLineArguments

Gets a string representing the command line arguments.

Commands

Returns the Commands collection.

ContextAttributes

Gets a ContextAttributes collection which allows automation clients to add new attributes to the current selected items in the Dynamic Help window and provide contextual help for the additional attributes.

Debugger

Gets the debugger objects.

DisplayMode

Gets the display mode, either MDI or Tabbed Documents.

Documents

Gets the collection of open documents in the development environment.

DTE

Gets the top-level extensibility object.

Edition

Gets a description of the edition of the environment.

Events

Gets a reference to the Events object.

FileName

Microsoft Internal Use Only.

Find

Gets the Find object that represents global text find operations.

FullName

Gets the full path and name of the object's file.

Globals

Gets the Globals object that contains values that may be saved in the solution (.sln) file, the project file, or in the user's profile data.

IsOpenFile[String, String]

Microsoft Internal Use Only.

ItemOperations

Gets the ItemOperations object.

LocaleID

Gets the ID of the locale in which the development environment is running.

Macros

Gets the Macros object.

MacrosIDE

Gets the root of the Macros IDE's automation model.

MainWindow

Gets a Window object representing the main development environment window.

Mode

Gets the mode of the development environment, either debug or design.

Name

Sets or gets the name of the _DTE object.

ObjectExtenders

Gets the ObjectExtenders object.

Properties[String, String]

Returns a Properties collection representing all available categories and subcategories contained in the Options dialog box on the Tools menu.

RegistryRoot

Gets a string with the path to the root of the Visual Studio registry settings.

SelectedItems

Gets a collection containing the items currently selected in the environment.

Solution

Gets the Solution object that represents all open projects in the current instance of the environment and allows access to the build objects.

SourceControl

Gets a SourceControl object that allows you to manipulate the source code control state of the file behind the object.

StatusBar

Gets the StatusBar object, representing the status bar on the main development environment window.

SuppressUI

Gets or sets whether UI should be displayed during the execution of automation code.

UndoContext

Gets the global UndoContext object.

UserControl

Sets or gets a value indicating whether the environment was launched by a user or by automation.

Version

Gets the host application's version number.

WindowConfigurations

Gets the WindowConfigurations collection, representing all available window configurations.

Windows

Gets a Windows collection containing the windows that display in the object.

Methods

ExecuteCommand(String, String)

Executes the specified command.

GetObject(String)

Gets an interface or object that is late-bound to the DTE object and can be accessed by name at run time.

LaunchWizard(String, Object[])

Runs a wizard with the supplied parameters.

OpenFile(String, String)

Microsoft Internal Use Only.

Quit()

Closes the environment.

SatelliteDllPath(String, String)

Returns the computed path to the satellite DLL when given the installation directory and the file name of the DLL containing localized resources.

Applies to