Help

  1. Help Files Contents
  2. How do I link help files to delphi 3?[NEW]

Help Files Contents

From: "Jarle Stabell" <jarle.stabel@dokpro.uio.no>

Using HELP_FINDER works if the "current tab" is not the 'Index' or 'Find' tab. HELP_FINDER opens the Help Topics window, but doesn't change tab to the Contents tab if current tab is 'Index' or 'Find'.

Try this code:


Function L1InvokeHelpMacro(const i_strMacro: String; const i_bForceFile:
Boolean): Boolean;
Begin
  if i_bForceFile then
    Application.HelpCommand(HELP_FORCEFILE, 0);

  Result:=Application.HelpCommand(HELP_COMMAND,
Longint(PChar(i_strMacro))); //The PChar cast not strictly necessary.
End;
Forces the associated help file to (be) open, and shows the 'Index' tab:
  L1InvokeHelpMacro('Search()', True);
Forces the associated help file to (be) open, and shows the 'Contents' tab:
  L1InvokeHelpMacro('Contents()', True);
Forces the associated help file to (be) open, and shows the 'Find' tab (WinHelp 4 only):
  L1InvokeHelpMacro('Find()', True);

How do I link help files to delphi 3?[NEW]

From: "James D. Rofkar" <jrofkar@cros.net>

Here's how I do it.

  1. First, set your project's help file. Do so by selecting the "Project/Options..." menu, then click on the "Application" tab, and type-in your help file in the "Help File" edit box. Otherwise, you can do this programmatically at run-time by setting the Application.HelpFile property.
  2. Next, set the "HelpContext" property of the control in question. In your case, the "Help" button's "HelpContext" would be something that probably relates to the dialog or window on which the Help button is located.
  3. Finally, in an event handler of the control, call the Application.HelpContext method. For your "Help" button, the OnClick event handler might resemble:

   procedure TForm1.btnHelpClick(Sender: TObject);
   begin
        Application.HelpContext(TButton(Sender).HelpContext);
   end;
That's it!

You can also call other Application methods to invoke the help file such as Application.HelpCommand and Application.HelpJump.


Please email me and tell me if you liked this page.