• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

After closing Help file, app does not regain focus

New Here ,
Aug 29, 2008 Aug 29, 2008

Copy link to clipboard

Copied

When I launch Help, the Help file obviously becomes the active window. But when I close the Help file, I'd like the app that I launched it from to become the active window. Currently it does not.

Is there a setting that will allow me to achieve this? I tested it against IE, which does become the active window after closing the Help file. However, I noticed that the Help file is always associated with the app, i.e., if I close the app while the Help file is open, both the app and the Help file close. I don't necessarily want that, but I do want to return to the app after closing the Help file w/o having to click the app to get back to where I was.

Thanks, everyone.. jd

Views

620

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 29, 2008 Aug 29, 2008

Copy link to clipboard

Copied

I've never seen a closed HTMLHelp file not give focus back to the calling program. What does get focus?

When you close the app the help closes. This is sometimes annoying. For example, I have a troubleshooting script in my help file that has the user close the program - poof! there go the instructions. But is usually something we live with. This is because in the Windows world, windows belong to the program that created them. The only way I know to avoid this is to have hh.exe open the help. This is the program that opens the help window when you click on it in Windows Explorer. It can be called by the app instead of using the HtmlHelp API, but is probably not worth doing. It will make all the context sensitive help more difficult to implement.

john

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 29, 2008 Aug 29, 2008

Copy link to clipboard

Copied

When I close the Help file, nothing has focus. I agree that it can be annoying that the Help file closes when the app does. I'm not looking for that, but I would live with it.

So is there a way to tell the Robo-created Help file to give focus back to the "host" app upon closing?

Thanks for your response, John.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Aug 29, 2008 Aug 29, 2008

Copy link to clipboard

Copied

I believe that can only be accomplished in the app, by the developers. That is, instructions to open and close can only go in one direction, from app to help.


Good luck,
Leon

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 02, 2008 Sep 02, 2008

Copy link to clipboard

Copied

But when the Help file is open, that's the app that's in control of giving focus back to the original app. At least, the developers tell me it's the responsibility of the Help file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 02, 2008 Sep 02, 2008

Copy link to clipboard

Copied

Hi, word wiz,

I think there are two possibilities here.

1) In their context help calls, your developers may not be passing to your .chm file the "handle" of the window from which help is called. The consequence of this is that the help file is not owned by the window, and as a result focus is not returned to the window when the help file is closed. You can read more about this here:

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

2) 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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 02, 2008 Sep 02, 2008

Copy link to clipboard

Copied

The developers are going to try "passing the handle." I'll let you know how it goes.

Many thanks for your help.. jd

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 08, 2008 Sep 08, 2008

Copy link to clipboard

Copied

Have you had any further progress with this? I have the same problem (see this thread: My version of the RoboHelp focus problem )

The thing I find most irritating is that the behavior I see is IDENTICAL whether a CHM file is called from my app or directly via double-click from Windows Explorer. A CHM file developed with RoboHelp does NOT return focus in either case. A CHM file from another source returns the focus no matter what.

AND... The help file for RoboHelp itself DOES NOT return focus to RoboHelp! ! !

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 08, 2008 Sep 08, 2008

Copy link to clipboard

Copied

LATEST
Pete Lees solution a few posts above this FIXES the problem. I commented out the portion of the javascript file he referenced and now the rebuilt CHM file returns focus regardless of who calls it.

Thanks for the help!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp