How to: Add the Help Pane Proxy Object to a Visual Basic Project
To integrate the Microsoft Help 2.0 components with your project, you add a Help Pane reference to your Visual Basic 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 an Imports statement for the Help Pane at the beginning of the code for your main form. (The Imports statement declares the HelpPane namespace and lets you call the HelpPane methods directly.)
Imports HelpPane
Create a new module using the module template.
Declare the session as a public variable in the module.
Add an Imports HelpPane statement at the beginning of the code for the class module.To take advantage of the Microsoft IntelliSense features in Microsoft Visual Basic and to achieve faster performance, use early binding to create your Help Pane session.
Imports HelpPane Module Module1 Public objHelpPane As HxHelpPane '... End Module
Create a new instance of the Help Pane proxy object.
objHelpPane = New HxHelpPane
The Help Pane proxy object can now be called from any form in the project, 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, then calling the DisplayContents method on the Help Pane.
Imports HelpPane
Module Module1
Public objHelpPane As HxHelpPane
Sub Main()
Try
objHelpPane = New HelpPane.HxHelpPane
objHelpPane.DisplayContents("")
Catch ex1 As Exception
Console.WriteLine(ex1)
End Try
End Sub
End Module