5 Replies Latest reply on Sep 8, 2008 11:27 AM by Philip_K._Wilson

    Losing focus

      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!


      P.S. Edited to add: I am using RoboHelp HTML X5.0.1
        • 1. Re: Losing focus
          Pete Lees Level 2
          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.

          • 2. Re: Losing focus
            Philip_K._Wilson Level 1
            Thanks for the response, Pete.

            I will continue to experiment with this and report back any results.
            • 3. Re: Losing focus
              Philip_K._Wilson Level 1
              I have removed ehlpdhtm.js from my build, but it makes no difference.

              Does anyone else have any ideas?
              • 4. Re: Losing focus
                MergeThis Level 4
                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,
                • 5. Re: Losing focus
                  Philip_K._Wilson Level 1
                  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.

                  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!