Implement EHS in Delphi7
Moderators: Alexander Halser, Michael Schwarzl
Implement EHS in Delphi7
1st of all I am not a Delphi7 programmer by a long shot but have no choice at this point.
We are running Delphi7 and that will not be changing.
I need to stop using .HLP files and get moved to .CHM files. I already have a tool to
create the .CHM file.
I have tried HTMLHelpViewer.pas. Was easy to implement. All I get was air when I click
on Help-Help Topics.
I have tried D6OnHelpFix.pas. Was easy to implement. All I get was air when I click
on Help-Help Topics.
I am now trying EHS.
I have added ehshelprouter.pas as a unit in a use statement
// Below added by BDH 11-14-14 then got a clean compile
ehshelprouter in 'ehshelprouter.pas';
My main form has an event called HelpTopics1, onClick runs HelpSpeedClick.
This is defined
procedure HelpSpeedClick(Sender: TObject);
procedure ExitSpeedClick(Sender: TObject);
As you can see I have been experimenting a little. But, what do I need here.
procedure TMainForm.HelpSpeedClick(Sender: TObject);
begin
// Changed by BDH 11-18-14
// Original Code is the one line of code below this line
// Application.HelpCommand(Help_Finder, 0);
// Below line added as replacement code
// ehshelprouter.HelpFile := AppPath() + 'Helpfile.chm';
ehshelprouter.HelpJump := ('helpfile.chm', 0);
end;
I know this is the place the old .hlp was working from, as I have been able to change the
symptoms when I click on it.
I would sure appreciate some assistance.
We are running Delphi7 and that will not be changing.
I need to stop using .HLP files and get moved to .CHM files. I already have a tool to
create the .CHM file.
I have tried HTMLHelpViewer.pas. Was easy to implement. All I get was air when I click
on Help-Help Topics.
I have tried D6OnHelpFix.pas. Was easy to implement. All I get was air when I click
on Help-Help Topics.
I am now trying EHS.
I have added ehshelprouter.pas as a unit in a use statement
// Below added by BDH 11-14-14 then got a clean compile
ehshelprouter in 'ehshelprouter.pas';
My main form has an event called HelpTopics1, onClick runs HelpSpeedClick.
This is defined
procedure HelpSpeedClick(Sender: TObject);
procedure ExitSpeedClick(Sender: TObject);
As you can see I have been experimenting a little. But, what do I need here.
procedure TMainForm.HelpSpeedClick(Sender: TObject);
begin
// Changed by BDH 11-18-14
// Original Code is the one line of code below this line
// Application.HelpCommand(Help_Finder, 0);
// Below line added as replacement code
// ehshelprouter.HelpFile := AppPath() + 'Helpfile.chm';
ehshelprouter.HelpJump := ('helpfile.chm', 0);
end;
I know this is the place the old .hlp was working from, as I have been able to change the
symptoms when I click on it.
I would sure appreciate some assistance.
- Alexander Halser
- EC-Software Support
- Posts: 4104
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Re: Implement EHS in Delphi7
What do you mean by "All I get was air"?
Your code example does certainly not compile.
Please elaborate.
Your code example does certainly not compile.
Please elaborate.
Re: Implement EHS in Delphi7
Thanks for the reply! I will be more specific. The code I displayed was work in
progress as a sample.
I do not plan on any type of context sensitive help. All I need to to click on
Help-Help Topics and open helpfile.chm in application folder.
As for "all I get is air". When I click on Help-Help Topics, nothing happens at all.
I also have helpfile.chm located in the same folder as the helpfile.hlp.
Now, this code compiles, builds, and opens helpfile.hlp just fine.
procedure TMainForm.HelpSpeedClick(Sender: TObject);
begin
// Changed by BDH 11-18-14
// Original Code is the one line of code below this line
Application.HelpCommand(Help_Finder, 0);
// Below line added as replacement code
// ehshelprouter.HelpFile := AppPath() + 'Helpfile.chm';
// ehshelprouter.HelpJump := ('helpfile.chm', 0);
end;
Now, I have eshhelprouter.pas in the use statement in the .dpr file as well as
the main form I am using.
As you can see I have tried variations of ehshelprouter and nothing worked. If you want
I can try all of the other options (HTMLHelpViewer.pas, and D6OnHelpFix.pas) and see
what I get.
If you let me know, I will be glad to try anything. I needed some busy work to keep an
other employee from being laid off for the winter, and creating the .CHM file is what
I gave him to do.
progress as a sample.
I do not plan on any type of context sensitive help. All I need to to click on
Help-Help Topics and open helpfile.chm in application folder.
As for "all I get is air". When I click on Help-Help Topics, nothing happens at all.
I also have helpfile.chm located in the same folder as the helpfile.hlp.
Now, this code compiles, builds, and opens helpfile.hlp just fine.
procedure TMainForm.HelpSpeedClick(Sender: TObject);
begin
// Changed by BDH 11-18-14
// Original Code is the one line of code below this line
Application.HelpCommand(Help_Finder, 0);
// Below line added as replacement code
// ehshelprouter.HelpFile := AppPath() + 'Helpfile.chm';
// ehshelprouter.HelpJump := ('helpfile.chm', 0);
end;
Now, I have eshhelprouter.pas in the use statement in the .dpr file as well as
the main form I am using.
As you can see I have tried variations of ehshelprouter and nothing worked. If you want
I can try all of the other options (HTMLHelpViewer.pas, and D6OnHelpFix.pas) and see
what I get.
If you let me know, I will be glad to try anything. I needed some busy work to keep an
other employee from being laid off for the winter, and creating the .CHM file is what
I gave him to do.
- Alexander Halser
- EC-Software Support
- Posts: 4104
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Re: Implement EHS in Delphi7
In this case, aI do not plan on any type of context sensitive help. All I need to to click on
Help-Help Topics and open helpfile.chm in application folder.
Code: Select all
ShellExecute( Application.Handle, 'open', PChar( <helpfilewithpath.chm> ), nil, nil, SW_NORMAL );
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH
Re: Implement EHS in Delphi7
Ok, before I try this, as of right now our Delphi7 applications all run on XP Pro, up to and including Win 8.1.1 (32-Bit & 64-Bit). I will be testing Win 10 as soon as I solve this issue.
With that said, will your solution work across those operating systems?
Finally, I believe I do not need an add-on unit like ehs.., D6O.. or HTMLHelp.. to make the shell command work. Correct?
With that said, will your solution work across those operating systems?
Finally, I believe I do not need an add-on unit like ehs.., D6O.. or HTMLHelp.. to make the shell command work. Correct?
- Alexander Halser
- EC-Software Support
- Posts: 4104
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Re: Implement EHS in Delphi7
Please try it. It's one line of code, not too much effort.Ok, before I try this
Re: Implement EHS in Delphi7
Using this code:
procedure TMainForm.HelpSpeedClick(Sender: TObject);
begin
// Changed by BDH 11-18-14
// Original Code is the one line of code below this line
// Application.HelpCommand(Help_Finder, 0);
// Below line added as replacement code
// ehshelprouter.HelpFile := AppPath() + 'Helpfile.chm';
// ehshelprouter.HelpJump := ('helpfile.chm', 0);
ShellExecute( Application.Handle, 'open', PChar(helpfile.chm), nil, nil, SW_NORMAL );
end;
Getting 2 compile errors:
Undeclared Identified 'ShellExecute"
Record, object or class type required
procedure TMainForm.HelpSpeedClick(Sender: TObject);
begin
// Changed by BDH 11-18-14
// Original Code is the one line of code below this line
// Application.HelpCommand(Help_Finder, 0);
// Below line added as replacement code
// ehshelprouter.HelpFile := AppPath() + 'Helpfile.chm';
// ehshelprouter.HelpJump := ('helpfile.chm', 0);
ShellExecute( Application.Handle, 'open', PChar(helpfile.chm), nil, nil, SW_NORMAL );
end;
Getting 2 compile errors:
Undeclared Identified 'ShellExecute"
Record, object or class type required
- Alexander Halser
- EC-Software Support
- Posts: 4104
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Re: Implement EHS in Delphi7
Include the unit ShellAPI in your uses clause, it's defined there.
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH
Re: Implement EHS in Delphi7
Ok, that got it down to one error
Record, object, or class type required
ShellExecute( Application.Handle, 'open', PChar(helpfile.chm), nil, nil, SW_NORMAL );
Record, object, or class type required
ShellExecute( Application.Handle, 'open', PChar(helpfile.chm), nil, nil, SW_NORMAL );
- Alexander Halser
- EC-Software Support
- Posts: 4104
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Re: Implement EHS in Delphi7
BHousley, you need a crash course in Pascal programming
Quotes around strings are always required in Pascal and don't forget to include the full path to your help file. Simply specifying "helpfile.chm" might not be found.
Quotes around strings are always required in Pascal and don't forget to include the full path to your help file. Simply specifying "helpfile.chm" might not be found.
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH
Re: Implement EHS in Delphi7
If you only knew my friend....I am a trained programmer, that is what my degree is in. I actually was actually in a programming contest and took 3rd in nation...LMAO...13 Languages back then, but, that was in early 70's. Have not wrote line of code since early 90's. Been System and Network Admin since then. Bottom line, you never forget logic and technic's but you do forget syntax.
Got a clean compile testing now.
You are good man, will let you know.
Got a clean compile testing now.
You are good man, will let you know.
Re: Implement EHS in Delphi7
You are a hero my friend!
helpfile.chm opening and appears to be operational.
Now, what about these little possibilities:
As of right now our Delphi7 applications all run on XP Pro, up to and including Win 8.1.1
(32-Bit & 64-Bit). I will be testing Win 10 as soon as I solve this issue.
With that said, will your solution work across those operating systems?
Finally, I believe I do not need an add-on unit like ehs.., D6O.. or HTMLHelp.. to
make the shell command work. Correct?
helpfile.chm opening and appears to be operational.
Now, what about these little possibilities:
As of right now our Delphi7 applications all run on XP Pro, up to and including Win 8.1.1
(32-Bit & 64-Bit). I will be testing Win 10 as soon as I solve this issue.
With that said, will your solution work across those operating systems?
Finally, I believe I do not need an add-on unit like ehs.., D6O.. or HTMLHelp.. to
make the shell command work. Correct?