tags:

views:

59

answers:

1
+1  Q: 

Help File Topic Id

I am trying to implemented F1 help for my winform application. I have read this thread:

http://stackoverflow.com/questions/1029316/how-to-create-f1-help-in-windows-forms-using-c

My question is how do I find the topic id of my topic in the chm file? I am using html help workshop, and I have looked over every html file and option and could not find it. Thanks.

Help.ShowHelp(this, "helpfile.chm", HelpNavigator.TopicId, "1234");
+1  A: 

You can define topic IDs for your help file as follows:

  1. Open your help project (.hhp) in a text editor.
  2. Add the [ALIAS] section and define IDs for the topics:

    [ALIAS]
    Foo=MyTopic.htm
    Bar=SomeFolder\AnotherTopic.htm
    
  3. Add the [MAP] section and specify the ID values:

    [MAP]
    #define Foo 7
    #define Bar 42
    
  4. Re-compile your help file.

More info here: HTML Help - Context Help Ids.

Helen
.NET still did not pick up on the alias, however I managed to hook the topic by hardcoding the .htm file.
Serge
@Serge: Sorry, my original answer was incorrect. Please see the updated answer.
Helen