Share via


Help2.GetNextTopic Method (String)

Given a URL returns the next URL in the table of contents.

Namespace:  Microsoft.VisualStudio.VSHelp80
Assembly:  Microsoft.VisualStudio.VSHelp80 (in Microsoft.VisualStudio.VSHelp80.dll)

Syntax

'Déclaration
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

Parameters

  • bstrURL
    Type: System.String
    String containing the URL of the current topic that is compatible with Internet Explorer.

Return Value

Type: System.String
Returns a string containing the URL of the next topic in the table of contents.

Implements

Help.GetNextTopic(String)

Examples

Create a Visual Studio add-in by using Visual C# as described in How to: Create an Add-In. Add references to Microsoft.VisualStudio.VSHelp, Microsoft.VisualStudio.VSHelp80, and System.Windows.Forms. Replace the code in the OnConnection method in the Connect.cs file with the following code. Run the code example as described in How to: Compile and Run the Automation Object Model Code Examples.

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);
    }
}

.NET Framework Security

See Also

Reference

Help2 Interface

GetNextTopic Overload

Microsoft.VisualStudio.VSHelp80 Namespace