Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
To integrate the Microsoft Help 2.0 components with your project, you add a reference to the Help Pane to your C# project, and then create an instance of the Help Pane proxy object.
To add a reference for the Help Pane proxy object
On the Visual Studio Project menu, click Add Reference.
Click the Browse tab.
In the File name text box, enter the path to C:\Windows\System32\HelpPaneProxy.dll.
Click OK.
To create an instance of the Help Pane proxy object
Add a using directive for the Help Pane proxy object at the beginning of the code for the application.
using HelpPane;
Create a new instance of the Help Pane proxy object.
HelpPane.HxHelpPane pane = new HelpPane.HxHelpPaneClass();
The Help Pane proxy object can now be called, and will remain as long as it is required. You do not have to explicitly un-initialize a session. Because the Help Pane proxy object is COM-based, the garbage collector handles marshaling through the interop assembly that was created when the component was added to the project.
Example
The following example demonstrates creating an instance of the Help Pane proxy object, and then calling the DisplayContents method on the Help Pane.
using System;
using HelpPane;
namespace SimpleHelpTest_CS
{
class Program
{
static void Main(string[] args)
{
try
{
HelpPane.HxHelpPane pane = new HelpPane.HxHelpPaneClass();
pane.DisplayContents("");
}
catch (Exception ex1)
{
Console.Write(ex1);
}
}
}
}