DTE 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在 Visual Studio Automation 物件模型中最上層的物件。 此類型的檔 _DTE 是最完整的。
public interface class DTE : EnvDTE::_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.CoClass(typeof(EnvDTE.DTEClass))>]
[<System.Runtime.InteropServices.Guid("04A72314-32E9-48E2-9B87-A63603454F3E")>]
type DTE = interface
interface _DTE
Public Interface DTE
Implements _DTE
- 衍生
- 屬性
- 實作
範例
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
備註
如需參考 EnvDTE
命名空間和物件的詳細資訊 DTE ,請參閱 常見問題:將增益集轉換成 VSPackage 擴充功能。
屬性
ActiveDocument |
取得使用中文件。 (繼承來源 _DTE) |
ActiveSolutionProjects |
取得目前所選取專案的陣列。 (繼承來源 _DTE) |
ActiveWindow |
傳回目前的使用中視窗;如果沒有其他視窗是作用中,則傳回最上層視窗。 (繼承來源 _DTE) |
AddIns |
取得 AddIns 集合,其中包含所有目前可用的增益集。 (繼承來源 _DTE) |
Application |
僅供 Microsoft 內部使用。 (繼承來源 _DTE) |
CommandBars |
取得對開發環境命令列的參考。 (繼承來源 _DTE) |
CommandLineArguments |
取得字串,表示命令列引數。 (繼承來源 _DTE) |
Commands |
傳回 Commands 集合。 (繼承來源 _DTE) |
ContextAttributes |
取得 ContextAttributes 集合,它可以讓 Automation 用戶端將新屬性加入至目前 [動態說明] 視窗中選取的項目,並且為其他屬性提供內容說明。 (繼承來源 _DTE) |
Debugger |
取得 Debugger 物件。 (繼承來源 _DTE) |
DisplayMode |
取得顯示模式,可能是 MDI 或索引標籤式文件。 (繼承來源 _DTE) |
Documents |
取得開發環境中已開啟文件的集合。 (繼承來源 _DTE) |
DTE |
取得最上層的擴充性物件。 (繼承來源 _DTE) |
Edition |
取得環境的版本說明。 (繼承來源 _DTE) |
Events |
取得 Events 物件的參考。 (繼承來源 _DTE) |
FileName |
僅供 Microsoft 內部使用。 (繼承來源 _DTE) |
Find |
取得 Find 物件,表示全域文字尋找作業。 (繼承來源 _DTE) |
FullName |
取得物件檔案的完整路徑和名稱。 (繼承來源 _DTE) |
Globals |
取得物件,該 Globals 物件包含可能儲存在方案 ( .sln) 檔、專案檔或使用者設定檔資料中的值。 (繼承來源 _DTE) |
IsOpenFile[String, String] |
僅供 Microsoft 內部使用。 (繼承來源 _DTE) |
ItemOperations |
取得 ItemOperations 物件。 (繼承來源 _DTE) |
LocaleID |
取得執行中開發環境所使用的地區設定 ID。 (繼承來源 _DTE) |
Macros |
取得 Macros 物件。 (繼承來源 _DTE) |
MacrosIDE |
取得巨集 IDE 之 Automation 模型的根物件。 (繼承來源 _DTE) |
MainWindow |
取得 Window 物件,表示主開發環境視窗。 (繼承來源 _DTE) |
Mode |
取得開發環境的模式,即偵錯或設計模式。 (繼承來源 _DTE) |
Name |
設定或取得 _DTE 物件的名稱。 (繼承來源 _DTE) |
ObjectExtenders |
取得 ObjectExtenders 物件。 (繼承來源 _DTE) |
Properties[String, String] |
傳回集合,這個 Properties 集合代表 [工具] 功能表上 [選項] 對話方塊中包含的所有可用類別和子類別。 (繼承來源 _DTE) |
RegistryRoot |
取得具有 Visual Studio 登錄設定根目錄路徑的字串。 (繼承來源 _DTE) |
SelectedItems |
取得包含目前環境中所選取之項目的集合。 (繼承來源 _DTE) |
Solution |
取得 Solution 物件,此物件代表目前環境執行個體中所有開啟專案,並且允許存取建置物件。 (繼承來源 _DTE) |
SourceControl |
取得 SourceControl 物件,此物件可讓您管理此物件後檔案的原始程式碼控制狀態。 (繼承來源 _DTE) |
StatusBar |
取得 StatusBar 物件,此物件代表主開發環境視窗中的狀態列。 (繼承來源 _DTE) |
SuppressUI |
取得或設定在 Automation 程式碼的執行過程中是否要顯示 UI。 (繼承來源 _DTE) |
UndoContext |
取得全域 UndoContext 物件。 (繼承來源 _DTE) |
UserControl |
設定或取得指示環境是否由使用者或 Automation 所啟動的值。 (繼承來源 _DTE) |
Version |
取得主應用程式 (Host Application) 的版本編號。 (繼承來源 _DTE) |
WindowConfigurations |
取得 WindowConfigurations 集合,此集合代表所有可用的視窗組態。 (繼承來源 _DTE) |
Windows |
取得 Windows 集合,該集合包含物件中顯示的視窗。 (繼承來源 _DTE) |
方法
ExecuteCommand(String, String) |
執行指定命令。 (繼承來源 _DTE) |
GetObject(String) |
取得晚期繫結 (Late-bound) 至 DTE 物件,並可在執行階段以名稱存取的介面或物件。 (繼承來源 _DTE) |
LaunchWizard(String, Object[]) |
以提供的參數執行精靈。 (繼承來源 _DTE) |
OpenFile(String, String) |
僅供 Microsoft 內部使用。 (繼承來源 _DTE) |
Quit() |
關閉環境。 (繼承來源 _DTE) |
SatelliteDllPath(String, String) |
傳回安裝目錄時附屬 DLL 的計算路徑,以及含有當地語系化資源的 DLL 檔名。 (繼承來源 _DTE) |