The DTE object is provided by the OnConnection method that you implement when you create an Add-in. The DTE object is the Application object in Visual Basic.
To access project-specific properties such as VBProjects or CSharpProjects, use the syntax DTE.GetObject("VBProjects").
For details about referencing the EnvDTE namespace and the DTE object, see Referencing Automation Assemblies and the DTE2 Object.