Help2.DisplayTopicFromURL(String) Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Zeigt ein Hilfethema an, das durch die URL im Dokument-Explorer angegeben wird.
public:
void DisplayTopicFromURL(System::String ^ pszURL);
public:
void DisplayTopicFromURL(Platform::String ^ pszURL);
void DisplayTopicFromURL(std::wstring const & pszURL);
[System.Runtime.InteropServices.DispId(7)]
public void DisplayTopicFromURL (string pszURL);
[<System.Runtime.InteropServices.DispId(7)>]
abstract member DisplayTopicFromURL : string -> unit
Public Sub DisplayTopicFromURL (pszURL As String)
Parameter
- pszURL
- String
Eine Zeichenfolge mit einer URL-Adresse, die mit Internet Explorer kompatibel ist.
Implementiert
- Attribute
Beispiele
Erstellen Visual Studio Sie ein Add-in mit, Visual C# wie unter Gewusst wie: Erstellen eines Add-insbeschrieben. Fügen Sie Verweise auf Microsoft.VisualStudio.VSHelp , Microsoft.VisualStudio.VSHelp80 und hinzu System.Windows.Forms . Ersetzen Sie den Code in der- OnConnection Methode in der Connect.cs-Datei durch den folgenden Code. Führen Sie das Codebeispiel wie unter Gewusst wie: Kompilieren und Ausführen der Codebeispiele für das Automatisierungs Objektmodellbeschrieben aus.
using System;
using Extensibility;
using EnvDTE;
using EnvDTE80;
using Microsoft.VisualStudio.VSHelp;
using Microsoft.VisualStudio.VSHelp80;
using System.Windows.Forms;
public void OnConnection(object application,
ext_ConnectMode connectMode, object addInInst, ref Array custom)
{
_applicationObject = (DTE2)application;
_addInInstance = (AddIn)addInInst;
HelpDisplayFromURLExample(_applicationObject);
}
public void HelpDisplayFromURLExample(DTE2 dte)
{
// This opens Document Explorer and
// displays the topic specified
// by the URL.
try
{
Microsoft.VisualStudio.VSHelp80.Help2 help2 =
(Microsoft.VisualStudio.VSHelp80.Help2)_applicationObject.GetObject ("Help2");
// Display the Visual Studio topic.
help2.DisplayTopicFromURL
("ms-help:
//MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_vstoc/
html/06ddebea-2c83-4a45-bb48-6264c797ed93.htm");
}
catch (SystemException ex)
{
MessageBox.Show("ERROR: " + ex);
}
}
Hinweise
DisplayTopicFromURL Öffnet den Dokument-Explorer, wenn er nicht bereits geöffnet ist.