Help.ShowHelp(Me, tempFileFullPath, "Shortcuts.htm") does not work

  • Thread starter Thread starter Academia
  • Start date Start date
A

Academia

My .chm file is an embedded resource so when I use it
GetManifestResourceStream returns a Stream which I convert into a temp file.



Then I try

Help.ShowHelp(Me, tempFileFullPath, "Shortcuts.htm")

which does not work.



It shows the Context pane but the right pane has the typical image that
shows when the site can not be found.

If I click a topic in the context pane it shows correctly in the right hand
pane.



Can you suggest a way to make the topic show initially?





Thanks



I get thousands of hit in Google but can't find the one I need.

Or maybe, I just don't recognize it when I see it.
 
I believe you need to change it to:

Help.ShowHelp(Me, Path.Combine(tempFileFullPath, "Shortcuts.htm"))
 
I know that won't work. I should have been clearer.
tempFileFullPath is the full path to the temp file that should be the
equivalent of the .chm file that I embedded.
Shortcuts.htm was one of the topic files I used to make the original .chm
file.

tempFileFullPath works OK if I use the 2 parameter overload but I want to
display something other than the default topic.


Thanks
 
I know that won't work. I should have been clearer.
tempFileFullPath is the full path to the temp file that should be the
equivalent of the .chm file that I embedded.
Shortcuts.htm was one of the topic files I used to make the original .chm
file.

tempFileFullPath works OK if I use the 2 parameter overload but I want to
display something other than the default topic.

Thanks

Googled first return, maybe you can look at:

http://www.startvbdotnet.com/controls/helpprovider.aspx
 
Help.ShowHelp(Me, tempFileFullPath, "Shortcuts.htm")

This should work, we use it in our products. Since you get your CHM
open, it seems the first and second parameters are OK. The only problem
I can see here is the third parameter. Make sure the html file name is
correct, with same letter case. Also, is "Shortcuts.htm" in CHM's root
folder or was it in some subfolder? Maybe that's the problem and you
need to specify something like "subfolder/Shortcuts.htm".
 
Peter Macej said:
This should work, we use it in our products. Since you get your CHM open,
it seems the first and second parameters are OK. The only problem I can
see here is the third parameter. Make sure the html file name is correct,
with same letter case. Also, is "Shortcuts.htm" in CHM's root folder or
was it in some subfolder? Maybe that's the problem and you need to specify
something like "subfolder/Shortcuts.htm".

--
Peter Macej
Helixoft - http://www.helixoft.com
VSdocman - Commenter and generator of class documentation for C#, VB .NET
and ASP .NET code
 
Thanks, this helped a lot.

Knowing that it should work helped a lot.

I had tried many versions on things like "subfolder/Shortcuts.htm" but never
found the correct combination.

Actually there was two levels of folders between CHM and HTM.

Because you told me that the command should work if the files are in the
correct place I left the command alone and played with the files.

Finally I put the CHM and all the HTM files in one directory and that
worked.

Thanks a lot
 
Finally I put the CHM and all the HTM files in one directory and that

Do you mean you will package CHM and also HTM files with your user
control? We only distribute CHM file. The HTM files are compiled into
CHM so there's no need to distribute them.
 
Peter Macej said:
Do you mean you will package CHM and also HTM files with your user
control? We only distribute CHM file. The HTM files are compiled into CHM
so there's no need to distribute them.

No I don't mean that. Now when I create the chm file I have that file's
location be the same folder as the one the htm files are in. Seems the
relative location of the htm file's must be store in the chm file and for
some reason I couldn't correctly specify the third parameter so that it
pointed to the htm if they were not in the same folder as the chm.


Thanks for your help
 
Back
Top