共用方式為


VsShellUtilities.OpenDocumentWithSpecificEditor Method (IServiceProvider, String, Guid, Guid, IVsUIHierarchy%, UInt32%, IVsWindowFrame%)

Opens the specified document by using the specified editor.

Namespace:  Microsoft.VisualStudio.Shell
Assemblies:   Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)

Syntax

'宣告
Public Shared Sub OpenDocumentWithSpecificEditor ( _
    provider As IServiceProvider, _
    fullPath As String, _
    editorType As Guid, _
    logicalView As Guid, _
    <OutAttribute> ByRef hierarchy As IVsUIHierarchy, _
    <OutAttribute> ByRef itemID As UInteger, _
    <OutAttribute> ByRef windowFrame As IVsWindowFrame _
)
'用途
Dim provider As IServiceProvider
Dim fullPath As String
Dim editorType As Guid
Dim logicalView As Guid
Dim hierarchy As IVsUIHierarchy
Dim itemID As UInteger
Dim windowFrame As IVsWindowFrame

VsShellUtilities.OpenDocumentWithSpecificEditor(provider, _
    fullPath, editorType, logicalView, _
    hierarchy, itemID, windowFrame)
public static void OpenDocumentWithSpecificEditor(
    IServiceProvider provider,
    string fullPath,
    Guid editorType,
    Guid logicalView,
    out IVsUIHierarchy hierarchy,
    out uint itemID,
    out IVsWindowFrame windowFrame
)
public:
static void OpenDocumentWithSpecificEditor(
    IServiceProvider^ provider, 
    String^ fullPath, 
    Guid editorType, 
    Guid logicalView, 
    [OutAttribute] IVsUIHierarchy^% hierarchy, 
    [OutAttribute] unsigned int% itemID, 
    [OutAttribute] IVsWindowFrame^% windowFrame
)
static member OpenDocumentWithSpecificEditor : 
        provider:IServiceProvider * 
        fullPath:string * 
        editorType:Guid * 
        logicalView:Guid * 
        hierarchy:IVsUIHierarchy byref * 
        itemID:uint32 byref * 
        windowFrame:IVsWindowFrame byref -> unit 
public static function OpenDocumentWithSpecificEditor(
    provider : IServiceProvider, 
    fullPath : String, 
    editorType : Guid, 
    logicalView : Guid, 
    hierarchy : IVsUIHierarchy, 
    itemID : uint, 
    windowFrame : IVsWindowFrame
)

Parameters

  • fullPath
    Type: System.String
    The absolute path of the document.
  • editorType
    Type: System.Guid
    The GUID of the type of editor to use.
  • logicalView
    Type: System.Guid
    The GUID of the logical view in which to open the document.

.NET Framework Security

See Also

Reference

VsShellUtilities Class

VsShellUtilities Members

OpenDocumentWithSpecificEditor Overload

Microsoft.VisualStudio.Shell Namespace