"The code is exactly
how I would like to write code and the algorithms used are very
efficient and well-documented."
Van T. Dinh, Microsoft MVP
|
|
Class: CWinHelp
Working with Windows Help (*.hlp) files. Code is included for opening, searching and closing help files. You can also open "Help on Help", contents pages, the help index, and run macros stored in help files.
Many of the Office and Visual Basic products provide tools for searching and displaying help files, but the VB solution is based on the use of the Common Dialog control. If your application is already using the Common Dialog control, it makes sense to use the Help facilities that VB offers. However, if you aren't using this control, and you need to implement support for Windows Help, this class is a better solution. Its size is obviously much smaller than the Common Dialog control, and its operation is very simple.
|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the CWinHelp class
|
|
HelpFile
|
Property
|
Sets the help file to use.
If the help you specify is not in the Windows\Help directory, you must supply the full path as part of this property.
|
|
CloseFile
|
Method
|
Marks the current help file as closed.
Note that because Windows Help is both a shared resource and a stand alone program, you cannot programmatically close a help file using the WinHelp API call. Instead, use this function to notify Windows Help that you are done with the help file. This releases the lock on the help file and allows your application to exit cleanly.
|
|
HelpOnHelp
|
Method
|
Opens the Help on Help page.
This method has the same effect as opening the WinHelp.hlp file, offering help on using the Windows Help engine.
|
|
OpenContentsTab
|
Method
|
Opens the Contents tab of the current help file
|
|
OpenContext
|
Method
|
Opens the specified Help context in the current help file.
This method opens a specific help topic by specifying the topic's unique Help Context ID numeric value. When you generate a help file, most tools generate a Map file that lists all the generated context ids. Use these values with this method to have your application display context-sensitive help.
|
|
OpenDefaultPage
|
Method
|
Opens the default page of the current help file
|
|
OpenFindTab
|
Method
|
Opens the Find tab of the current help file
|
|
OpenIndexTab
|
Method
|
Opens the current help file with the Index tab active
|
|
OpenIndexTabWithSearch
|
Method
|
Opens the specified help file to the Index tab and supplies the specified search string as the Help search string
|
|
RunMacro
|
Method
|
Runs the specified macro in the current help file.
A help file macro is a sequence of commands embedded in the help file to perform extended operations.
|
Overview of Total Visual SourceBook
The source code in Total Visual
SourceBook includes modules and classes for Microsoft Access, Visual
Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily
add this professionally written, tested, and documented royalty-free code
into your applications to simplify your application development efforts.
Additional Resources
|
|