Método Help2.GetNextTopic
Uma URL especificada retorna o URL de avançar no sumário.
Namespace: Microsoft.VisualStudio.VSHelp80
Assembly: Microsoft.VisualStudio.VSHelp80 (em Microsoft.VisualStudio.VSHelp80.dll)
Sintaxe
'Declaração
Function GetNextTopic ( _
bstrURL As String _
) As String
string GetNextTopic(
string bstrURL
)
String^ GetNextTopic(
[InAttribute] String^ bstrURL
)
abstract GetNextTopic :
bstrURL:string -> string
function GetNextTopic(
bstrURL : String
) : String
Parâmetros
bstrURL
Tipo: StringA seqüência de caracteres que contém o URL do tópico atual que seja compatível com o Internet Explorer.
Valor de retorno
Tipo: String
Retorna um string que contém o URL do próximo tópico no sumário.
Exemplos
Criar um Visual Studio suplemento usando Visual C# conforme descrito em Como criar um suplemento. Add references to Microsoft.VisualStudio.VSHelp, Microsoft.VisualStudio.VSHelp80, and System.Windows.Forms. Substitua o código na OnConnection método no arquivo Connect. cs com o código a seguir. Executar o exemplo de código, conforme descrito em Como compilar e executar os exemplos de código do modelo de objeto Automation.
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;
HelpGetNextURLExample(_applicationObject);
}
public void HelpGetNextURLExample(DTE2 dte)
{
// Returns and displays the URL of the topic that followins
// the topic specified
// by the URL in the table of contents.
try
{
Microsoft.VisualStudio.VSHelp80.Help2 help2 =
(Microsoft.VisualStudio.VSHelp80.Help2)_applicationObject.GetObject
("Help2");
// Get the next URL from the Visual Studio topic
// and display it.
MessageBox.Show("The next URL after the supplied one is "
+ "\n" + help2.GetNextTopic
("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);
}
}
Segurança do .NET Framework
- Confiança total para o chamador imediato. O membro não pode ser usado por código parcialmente confiável. Para obter mais informações, consulte Usando bibliotecas de código parcialmente confiável.