I have the \"Use Topmost Window Style\" unchecked but the help (*.chm) does not yield focus (i.e., go to background) to the application. Specifically, if I open the application then open the help file, the help file window is on top. Clicking on the application window should move it to the top and the help window behind. But this does not happen; the help window stays on top. I actually have several application/help files that behave this way but other application/help files that do surrender focus. Any suggestions?
Thanks.
Bill
Help won't yield focus
-
- Jr. Propeller Head
- Posts: 1
- Joined: Thu Jul 05, 2007 11:49 am
- Location: Calgary, Alberta Canada
Help file will not yield focus
Has anyone found a solution to this problem? I've also seen the same issue and we are looking for a way for users to tile the application and Help windows. By clicking one, it brings it to the front. this is extremely useful when users are trying to read a Help topic and execute the instructions in the application window.
Ruth
When I had this issue it was something that needed fixing on the developer side of things. It had something to do with how the Help was incorporated with the application. Can't offer any more details I'm afraid, it was ages ago and I don't think I knew the details of it at the time, but it was definitely not a Flare issue.
-
- Sr. Propeller Head
- Posts: 150
- Joined: Thu Feb 09, 2006 12:33 pm
- Location: Bracknell, Berkshire, UK
Re: Help won't yield focus
This is a very late response, and I imagine that Bill has now found the solution. But for the benefit of anyone else who may be searching these forums for a solution to the same issue, here is an explanation of why HTML Help files usually retain focus when called from a program, and a suggested workaround.
According to Microsoft's HTML Help API documentation (http://msdn2.microsoft.com/en-us/librar ... S.85).aspx):
If you look at a typical HTML Help API call, you'll see that the first parameter specifies the "handle" of the window from which help is called:
If the developer passes "null" rather than the window handle as the first parameter of the call, the help window is no longer owned by the calling program, and so does not retain focus. Here is an example of a modified call:
There's a drawback to this, though: when called in this way, the help window is no longer bound by the actions of the calling program. So if the user closes or minimises the program, the help window isn't closed or minimised as well.
Pete
According to Microsoft's HTML Help API documentation (http://msdn2.microsoft.com/en-us/librar ... S.85).aspx):
So the fact that the help window retains focus is actually the standard behaviour.Any help window that you create through the HTML Help API is owned by the calling, or parent, program. This allows the help window to stay on top of its parent, yet not be on top of any other program that has focus.
If you look at a typical HTML Help API call, you'll see that the first parameter specifies the "handle" of the window from which help is called:
Code: Select all
HtmlHelp(hwndCaller,"YourHelpFile.chm",HH_HELP_CONTEXT,1001);
Code: Select all
HtmlHelp(0,"YourHelpFile.chm",HH_HELP_CONTEXT,1001);
Pete
Re: Help won't yield focus
If you are using C# to launch your help file you might wish to see the end of the following thread for a way around this:
http://forums.madcapsoftware.com/viewto ... 948#p37948
Mark
http://forums.madcapsoftware.com/viewto ... 948#p37948
Mark