Question

I already have this code from another question on this website.

Help.ShowHelp(ParentForm, 
("C:\Users\Beaudean\Desktop\Help.chm"),HelpNavigator.TableOfContents, Nothing)

That works fine except i need the location of the chm help file to point to "my.resources" where it exists because i need to install my program but in that code example it only works with strings?

Thanks you :)

Was it helpful?

Solution

You cannot make this work. The .chm help file viewer is an external program, hh.exe. It doesn't know anything about managed resources, it needs a .chm file on disk.

Setup your project so that the .chm file is available in your build directory. Project + Add Existing Item and pick your .chm file. Select the added file and set its Build property to Content (so it gets installed with the rest of your files) and its Copy to Output Directory to "Copy if Newer" (so it gets copied to your build directory).

And modify your code so it can always find that file:

    Dim path = System.IO.Path.Combine(Application.StartupPath, "Help.chm")
    Help.ShowHelp(ParentForm, path, HelpNavigator.TableOfContents)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top