Skip to main content
Inspiring
August 21, 2008
Answered

Losing focus

  • August 21, 2008
  • 3 replies
  • 484 views
I have inherited an HtmlHelp application generated in RoboHelp. Whether I call it from my application (VB6) or double-click it in a Windows Explorer directory, it does not return focus to the calling app.

This is apparently unique to RoboHelp, as other .CHM files I have DO return focus whether called from my VB6 app or from Windows Explorer.

I found an interesting tidbit in my searching (see link below), but his solution makes no difference for me, and I see no evidence my help app is using DHTML anyway.

Any help that can be provided would be greatly appreciated!

http://forums.madcapsoftware.com/viewtopic.php?f=8&t=5239

P.S. Edited to add: I am using RoboHelp HTML X5.0.1
This topic has been closed for replies.
Correct answer Philip_K__Wilson
Here is the solution to my problem as suggested by Pete lees in another thread on the same problem:
===============
Pete Lees:
There appears to be something slightly wrong with the ehlpdhtm.js file that is compiled into some (perhaps all?) RoboHelp-generated .chm files. As far as I can see, the JavaScript functions that are responsible for the problem are the ones enclosed by the following two comments in the ehlpdhtm.js file:

//Begin to support previous HHActiveX invoking
...
//End to support previous HHActiveX invoking

These JavaScript functions seem to be responsible for activating the HHActiveX DLL, which I believe implements RoboHelp add-in features like browse sequences and Glossary tab in a .chm file. In any event, if I comment out these functions, a .chm file that previously failed to return focus to the Windows desktop now does so. Obviously, though, by disabling these functions I lose the additional features that the DLL provides.

Pete
=================
I commented out the section Pete mentioned, rebuilt my CHM, and now it works just fine. I had previously tried Pete's idea of removing the entire js file from the build, but I must have not done it correctly, as it had no effect.

thanks, Pete!

3 replies

Philip_K__WilsonAuthorCorrect answer
Inspiring
September 8, 2008
Here is the solution to my problem as suggested by Pete lees in another thread on the same problem:
===============
Pete Lees:
There appears to be something slightly wrong with the ehlpdhtm.js file that is compiled into some (perhaps all?) RoboHelp-generated .chm files. As far as I can see, the JavaScript functions that are responsible for the problem are the ones enclosed by the following two comments in the ehlpdhtm.js file:

//Begin to support previous HHActiveX invoking
...
//End to support previous HHActiveX invoking

These JavaScript functions seem to be responsible for activating the HHActiveX DLL, which I believe implements RoboHelp add-in features like browse sequences and Glossary tab in a .chm file. In any event, if I comment out these functions, a .chm file that previously failed to return focus to the Windows desktop now does so. Obviously, though, by disabling these functions I lose the additional features that the DLL provides.

Pete
=================
I commented out the section Pete mentioned, rebuilt my CHM, and now it works just fine. I had previously tried Pete's idea of removing the entire js file from the build, but I must have not done it correctly, as it had no effect.

thanks, Pete!
MergeThis
Inspiring
August 22, 2008
I don't know if it will help, but you might want to do the free upgrade to X5.0.2, available here, from 2004.


Good luck,
Leon
Participating Frequently
August 22, 2008
Hi, tenoreleven, and welcome,

There does seem to be something in the ehlpdhtm.js file that is responsible for this problem, which I've seen in other RoboHelp-generated .chm files. My guess is that the BsHHActivateComponents function in the ehlpdhtm.js file is the culprit.

If you have no reason to use this JavaScript file then you might try excluding it from your help builds.

Pete
Inspiring
August 22, 2008
Thanks for the response, Pete.

I will continue to experiment with this and report back any results.
Inspiring
August 22, 2008
I have removed ehlpdhtm.js from my build, but it makes no difference.

Does anyone else have any ideas?