共用方式為


SVsHelpService Interface

Passed to GetService to return a reference to IVsHelpSystem.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'宣告
<GuidAttribute("854D7AC0-BC3D-11D0-B421-00A0C90F9DC4")> _
<GuidAttribute("854D7AC0-BC3D-11D0-B421-00A0C90F9DC4")> _
<ComVisibleAttribute(False)> _
Public Interface SVsHelpService
'用途
Dim instance As SVsHelpService
[GuidAttribute("854D7AC0-BC3D-11D0-B421-00A0C90F9DC4")]
[GuidAttribute("854D7AC0-BC3D-11D0-B421-00A0C90F9DC4")]
[ComVisibleAttribute(false)]
public interface SVsHelpService
[GuidAttribute(L"854D7AC0-BC3D-11D0-B421-00A0C90F9DC4")]
[GuidAttribute(L"854D7AC0-BC3D-11D0-B421-00A0C90F9DC4")]
[ComVisibleAttribute(false)]
public interface class SVsHelpService
[<GuidAttribute("854D7AC0-BC3D-11D0-B421-00A0C90F9DC4")>]
[<GuidAttribute("854D7AC0-BC3D-11D0-B421-00A0C90F9DC4")>]
[<ComVisibleAttribute(false)>]
type SVsHelpService =  interface end
public interface SVsHelpService

Examples

The following example shows how to use this service to display a topic for a specific keyword.

using Microsoft.VisualStudio.Shell.Interop;

namespace MyPackageNamespace
{
    class MyPackage : Package
    {
        void ShowHelp(string keyword)
        {
            IVsHelpSystem helpSystem = this.GetService(typeof(SVsHelpService) as IVsHelpSystem;
            if (null != helpSystem)
            {
                helpSystem.ALinkSearch(keyword, 0, 0);
            }
        }
    }
}

See Also

Reference

Microsoft.VisualStudio.Shell.Interop Namespace