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?
on later versions the WinHelp component must be installed
Installed in Windows as a separate download from MS? or installed in the delphi IDE? I don't know because on my W7 system it just worked out of the box. BTW WinHelpViewer and the following tweak fixed the issue:Application.HelpFile := ExtractFilePath(Application.ExeName)+'Life32.hlp';
– Ritzy