Add Launch Code
After you have completed the configuration steps listed in the Configure UniHelp page, you now need to add launch code in the Action event of your help menu handler or help button that will display the UniHelp window when activated. This page includes example code for launching a help file in a standard help folder, launching a help file within a Virtual Volume, and performing context-sensitive keyword searches of your help system.
Since your help folder is already assigned to the HelpFolder property in the UniHelpEngine's Constructor method, to launch a help file is as easy as passing a FolderItem (of a help file that resides within your help folder) to the UniHelpEngine.Run method. Since a new UniHelp instance of the UniHelpEngine class was already created in your App.Open event, all you need to do is call UniHelp.Run with the FolderItem parameter.
Dim hlppage As FolderItem
hlppage = UniHelp.HelpFolder.Child("introduction.html")
UniHelp.Run(hlppage)
UniHelp also provides you with a way to perform context-sensitive searches of your help system from your application. So instead of calling a specific help file, you would pass a keyword string to the UniHelpEngine.Run method. Since a new UniHelp instance of the UniHelpEngine class was already created in your App.Open event, all you need to do is call UniHelp.Run with the string parameter.
UniHelp.Run("HTML")
The example above searches the help system for the keyword "HTML". UniHelp searches your help topics' keywords, title, and description located in the Table of Contents XML file (uhtoc.xml). And if you set UseFullTextSearch=TRUE in the UniHelpEngine.Constructor, then UniHelp searches will also search the full text content of your help pages, providing very comprehensive search results.
If you use HelpLogic to publish your help pages for use with UniHelp, then HelpLogic automatically generates the required XML files along with your help pages during the publishing process. Purchase a UniHelp Component License to receive FREE access to a special UniHelp Edition of HelpLogic for easily creating your UniHelp compatible help pages and settings! Or purchase a UniHelp Source Code License, which includes a full version of HelpLogic. HelpLogic is the award-winning help authoring solution for Mac OS X and Windows XP/Vista. For complete details, please see the Using FREE HelpLogic page.
Unlike previous versions of UniHelp that required unique code for accessing Virtual Volumes, UniHelp 3 and higher makes it much easier to work with Virtual Volumes. Now calling a help page from a Virtual Volume uses the exact same launch code as if you were calling a help file from a standard help folder. For example, if you already configured the UniHelpEngine's Constructor to access your Virtual Volume, then simply use the same launch code as standard help folders to call a help page from your Virtual Volume.
Dim hlppage As FolderItem
hlppage = UniHelp.HelpFolder.Child("introduction.html")
UniHelp.Run(hlppage)
For additional information on working with Virtual Volumes, please see the Using Virtual Volumes page.