Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML Help Problems

Status
Not open for further replies.

rb74

Programmer
May 5, 2002
64
US
Hi all,

I have built a MDI application with 15 child forms. I created the HTML help files in the HTML workshop and compiled the help file. I also created context sensitive help in the compiled help file, and assigned the topic ID to each form's HelpContextID property. In the Form_Load event of the MDI parent form, I inserted this code App.HelpFile = App.Path & "\MyApp_Help.chm". So far I think I have been following the correct steps, and I checked for this topic in the forums and I think I am okay in this preparation.

Ok, here is the weird part. I have one form that is the kind of "main" form where data entry occurs. When I press F1 when this form has focus, the HTML help loads with the correct html page loaded. This also works with my menu command with SendKeys "{F1}" in the menubar on this form as well. If I close this form, then either give focus to another already open form or open a different new form and press F1, nothing happens. In addition, I am testing SendKeys "{F1}" coded in the menubar on only one other form, and when I select that menu item with the SendKeys behind it, my app hangs. I have to do Ctrl-Alt-Delete to kill it, then close VB so that I can work with it.

One other bit of information. Before I added the context sensitive information to all forms and to the compiled .chm file, I first tested the help system. The two forms I mentioned above (the main form, and the form that causes the app to hang when selecting the menubar Help that has SendKeys "{F1}") worked fine loading the default html file and loaded the HTML Help each time.

Does anyone have any idea as to why this is happening?


Thanks,

Rob
 
so the problem is SendKeys?

instead of that try shellexecute.

Known is handfull, Unknown is worldfull
 
vbkris,

SendKeys is one of the problems, and thank you for the suggestion. I am thinking it may be something with the compiled help file, because if I take out the HelpContextID's for each form, only the main form opens the help file when I press F1. I think I am going to create another compiled help file and see if this fixes the situation of whether the other forms can open the help file.


Thanks,

Rob
 
rb74, have you taken a look at faq222-2088? If not it may be helpful.

Thanks and Good Luck!

zemp
 
Thanks, Zemp. I missed that FAQ (it was 3 in the morning). There was one step in the FAQ that I didn't know about, which I will try when I get a break at work. I will let you know if it helps.


Thanks again,

Rob
 
Hi all,

I am sorry for taking a while to respond. I did complete the step I mentioned above that I thought I missed, but I completed it an alternate way when I initially connected my help file to the application.

I did notice something else though. I mentioned earlier that one form can launch the help file, my main data entry form. When this form loads, none of the objects on the form gain focus. So pressing F1 launches the help file. Makes sense. If I give focus to any object on the form and press F1, the application hangs and I have to Ctrl-Alt-Delete to stop it from hanging. Each component on the form has the HelpContextID set to 0, so I am trying to make it as general as possible.

Any ideas?

Rob

Go Ducks.



 
Just thought you might be interested in some help tools I use from a company called Innovasys.

I use the HelpStudio and Context!VB which integrate into the VB IDE hand make my help coding so much quicker.

They are at (no I am not part of the company :) )

Regards

Jonathan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top