_DTE الواجهة
كائن المستوى الأعلى في طراز كائن Automation لبرنامج Visual Studio. الرجوع إلى _DTEلهذه الوظيفة. لا تقم بالتمثيل من هذه الفئة.
مساحة الاسم: EnvDTE
التجميع: EnvDTE (في EnvDTE.dll)
بناء الجملة
'إقرار
<GuidAttribute("04A72314-32E9-48E2-9B87-A63603454F3E")> _
Public Interface _DTE
[GuidAttribute("04A72314-32E9-48E2-9B87-A63603454F3E")]
public interface _DTE
[GuidAttribute(L"04A72314-32E9-48E2-9B87-A63603454F3E")]
public interface class _DTE
[<GuidAttribute("04A72314-32E9-48E2-9B87-A63603454F3E")>]
type _DTE = interface end
public interface _DTE
ملاحظات
_DTEكائن تم توفيره بواسطة OnConnectionالطريقة التي يتم بها تنفيذ عندما تقوم بإنشاء الوظائف-بوصة _DTEكائن هو Applicationكائن في Visual أساسى.
للوصول إلى الخصائص المتعلقة بالمشروع مثل VBProjectsأو CSharpProjects، استخدم بناء الجملة DTE.GetObject("VBProjects").
للحصول على التفاصيل حول الرجوع إلى EnvDTEمساحة الاسم و _DTEالكائنات، راجع كيفية: للحصول على مراجع إلى DTE والكائنات DTE2.
أمثلة
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