This project has moved and is read-only. For the latest updates, please go here.

Conceptual content from Help.ShowHelp

Topics: User Forum
Feb 4, 2009 at 3:09 AM
I've been trying to show Conceptual help topics from my Winform app using Help.ShowHelp (this, helpFileName, HelpNavigator.Topic, topicName).  The SHFB help topic for NamingMethod shows how a Guid is calculated from a namespace, type, field, etc by taking a MD5 hash and converting to a Guid before adding html and .htm.    Can I do the same for my conceptual topic?  I know I can manually paste in the Guid, but is there a method of taking my conceptual topic and perform the same MD5 hash and conversion to Guid, or have I missed a subtle leading backslash or path before hashing?

Feb 4, 2009 at 3:58 PM
GUIDs for conceptual topics are true GUIDs generated when the topic file is created.  They aren't based on any hash like the API topic names.  As such, just cut and paste the ID from the topic, prefixed with "html/" and with a ".htm" extension.  For example:

    Help.ShowHelp(this, "MyHelpFile.chm", HelpNavigator.Topic, "html/bd1ddb51-1c4f-434f-bb1a-ce2135d3a909.htm");

Feb 5, 2009 at 10:43 AM
Hi Eric,

That's the conclusion I had come to (and had got working).  Thinking about it logically, it's very likely that topics/filenames won't be unique - i.e. Introduction.aml, Errors.aml multiple times in a single SHFB project and the Guid wouldn't be unique.  SHFB is still a very useful tool and credit to you for all the hard work in it's development.  Can't wait 'till its integrated into Visual Studio.

Feb 5, 2009 at 4:14 PM
> it's very likely that topics/filenames won't be unique ... and the Guid wouldn't be unique

I guess I don't follow your reasoning on that.  As you create each new topic, a new GUID is created.  The only case this wouldn't be true is if you copied a topic from one filename to another.  In this case, the GUIDs would be the same but the build would fail because it won't allow two topics with the same GUID.  In cases like that, you'd need to manually generate a new GUID or create a new topic file with an auto-generated GUID and copy/paste the content into the new file.  The actual name of the file could be the same as long as the GUIDs within them are unique.  If you find yourself copying a particular topic a lot, you can create a custom template file out of it and put it in the conceptual templates folder.  That way, they show up on the Custom Templates sub-menu and will get a new GUID when added to the project.