I have a .hlp file that goes with the application.
Because the functionality has not changed since I last wrote the app the hlp (written in 2003) is still valid.
However when I compile the app in Delphi XE7 I cannot get the application to recognose the hlp file.
In the .dpr file I have
begin
Application.Initialize;
Application.HelpFile := 'Life32.hlp';
Application.Run;
//sometimes the application hung here, due to OLE issues
//exitprocess prevents that.
ExitProcess(0);
end.
When I do
procedure TProgCorner.Button2Click(Sender: TObject);
begin
Application.HelpContext(4);
end;
I get
First chance exception at $75EEB9BC. Exception class EHelpSystemException with message 'No context-sensitive help installed'.
The helpfile
property of the form is set to exename.hlp
.
Manually double-clicking on the .hlp
file in explorer opens the hlp file just fine.
How do I get Delphi to open the hlp file when called upon?
You must include the Vcl.WinHelpViewer
unit in your project for the WinHelp system to be installed.
Be warned that WinHelp support ended at XP and on later versions the WinHelp component must be installed separately.
For later versions of Delphi like 10 (Seattle), 10.1 (Berlin), 10.2 (Tokyo), 10.3 (Rio) and 10.4 (Sydney):
You should not add both units to the same application.
The full article: HelpScribble’s HelpContext Property Editor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With