views:

274

answers:

1

Hello,

I have a vb.net Winforms application. I also have a compiled help file (chm) file that I created using RoboHelp 6.0.

I want to open to a specific help topic and so to do that I am using the following code.

System.Windows.Forms.Help.ShowHelp(Me, "MyHelpFile.chm",HelpNavigator.KeywordIndex, "MyTopic")

Of course I am using variable instead of string literals ... work with me here ; / )

In this case the Help file opens to the Index in the left pane and the topic is selected in the Index pane but the right (Content) pane is showing the Main/First page of the help file...not my topic.

I have tried every combination from the HelpNavigator enum and none of them work. Only a few of them should work since most of them are not designed to open to a specfic topic...but for the ones that should work here is the result.

HelpNavigator.Topic - When I use this option I get the left pane opens to the TOC with everything collapsed and nothing selected. The right pane gives a standard IE error:

"This program cannot display the webpage 

   Most likely causes:
You are not connected to the Internet. 
The website is encountering problems. 
There might be a typing error in the address. 

   What you can try: 
     Check your Internet connection. Try visiting another website to make sure you are connected.  

     Retype the address.  

     Go back to the previous page. 

     More information "

HelpNavigator.TopicID - I cannot try because as far as I can tell my topics do not have Topic IDs.

Here are my questions -

Any ideas what is wrong? How can I troubleshoot help file issues? (For example, validate that the topic exists in the help file? I am sure it is in the source but it doesn't seem to find it in the compiled version. If you double click the topic in the index or TOC it opens just fine.)

My ideal solution would be to open the TOC in the Left pane with the topic selected (but I will settle for Index int the left pane) and the Right pane shows the Topic content.

Seth

+1  A: 

The following link has the explanation--

http://notcolin.wordpress.com/2009/02/09/the-perils-of-context-sensitive-help/

You have to add a map id and alias it to a topic.

Seth

Seth Spearman