There are many options for providing help in your applications. Some look tricky to implement and we present some of the more straightforward if not up-to-date methods here. Latest methods for Windows would use compiled help files (.chm) and recent version of Delphi. This may not be worth the trouble for your current projects but it may stand you in good stead for the future. Consider whether your users would prefer to access help via a button or menu (or with the F1 key for context-sensitive help).
- The easiest method uses the ShellExecute method to execute a browser external to your application. For a demonstration, see program RunApplication at the bottom of our page entitled Character Coding Schemes.
- An alternative method is to embed a web browser control within your application. We demonstrate the use of TWebBrowser in Delphi 7 (which uses a file that is provided by Internet Explorer on Windows computers) and TurboPower in Lazarus. TurboPower can handle frames but not stylesheets. You might be able to understand the code to see how it works. The Firefox browser is based on the open-source Gecko software. Follow the third link below for advice on installing and using the TGeckoBrowser component.
- If you need context-sensitive help, the application Lazarus\examples\helphtml\htmlhelp1.lpi demonstrates one method where you set the HelpType of the relevant components to htKeyword and then set the Keyword property of each to the pathname of the required HTML help file. Another method uses a single, composite help file of type .hlp or .chm, sets the HelpType to htContext, then uses an integer for the context property to locate the required page of help. Bugs have been reported for some Delphi versions so be prepared for difficulties.