Images not displaying in CHM using C# Help.ShowHelp method
Images not displaying in CHM using C# Help.ShowHelp method
Hi everybody. I'm having a problem displaying a CHM file from my .NET (C#) application. As you may know, the .NET Framework has a class named Help in the System.Windows.Forms namespace. The most common use of this class is to display a CHM help file via the static ShowHelp method. E.g. System.Windows.Forms.Help.ShowHelp(parentForm, pathToMyChmFile);
This works just fine with CHM files generated with the standard HTML Help Workshop (a simple program for generating CHM files that is available for free from Microsoft). However, images are not displayed when I use Help.ShowHelp() against a CHM file generated with MadCap Flare. If I launch the CHM file directly from Windows Explorer the help file displays without issue. How can I get a CHM created in Flare to display images when using Help.ShowHelp()?
This works just fine with CHM files generated with the standard HTML Help Workshop (a simple program for generating CHM files that is available for free from Microsoft). However, images are not displayed when I use Help.ShowHelp() against a CHM file generated with MadCap Flare. If I launch the CHM file directly from Windows Explorer the help file displays without issue. How can I get a CHM created in Flare to display images when using Help.ShowHelp()?
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
I cannot give you any tips for the programming issue, but it is that Flare uses the same HTML Workshop compiler to create CHMs. You can find a project file in the temp folder of the output folder for your project. Try and give that a go with HTML Workshop and see what the result is, that may narrow it down a bit.
And nothing is free from Microsoft, you have buy at least a Windows license...
And nothing is free from Microsoft, you have buy at least a Windows license...
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
Our image links used to look like this:
<img src=\"home_logo.gif\" style=\"border-style: none;\" width=\"129\" height=\"80\" border=\"0\" />
Compiled in Flare, they look like this:
<img src=\"ms-its:ReleaseNotes.chm::home_logo.gif\" style=\"border-style: none;\" width=\"129px\" height=\"80px\" border=\"0\" />
I'm guessing that is causing the problem. I believe there is a security vulnerability in the ms-its protocol as noted on this website: http://www.ca.com/us/securityadvisor/vu ... x?id=26699 . Perhaps Microsoft has released a patch that prevents resources linked with ms-its from loading?
Also, if the CHM file is renamed the images will no longer work because the reference to the file name is compiled into the CHM. Is there any way to change this behavior?
Considering that Flare is designed specifically for .NET developers it would make sense to support the standard method for displaying CHM files, which in .NET is Help.ShowHelp().
<img src=\"home_logo.gif\" style=\"border-style: none;\" width=\"129\" height=\"80\" border=\"0\" />
Compiled in Flare, they look like this:
<img src=\"ms-its:ReleaseNotes.chm::home_logo.gif\" style=\"border-style: none;\" width=\"129px\" height=\"80px\" border=\"0\" />
I'm guessing that is causing the problem. I believe there is a security vulnerability in the ms-its protocol as noted on this website: http://www.ca.com/us/securityadvisor/vu ... x?id=26699 . Perhaps Microsoft has released a patch that prevents resources linked with ms-its from loading?
Also, if the CHM file is renamed the images will no longer work because the reference to the file name is compiled into the CHM. Is there any way to change this behavior?
Considering that Flare is designed specifically for .NET developers it would make sense to support the standard method for displaying CHM files, which in .NET is Help.ShowHelp().
More information on the security issue with \"ms-its\" can be found on microsoft.com. Links below.
http://www.microsoft.com/technet/securi ... 5-026.mspx
http://support.microsoft.com/kb/896358
http://www.microsoft.com/technet/securi ... 5-026.mspx
http://support.microsoft.com/kb/896358
When I edit my HTML file directly within the Flare project, the IMG tag does not have \"ms-its\". It appears that part of the Flare compiling process is adding it. If I look at the intermediate file (output\\username\\Temporary\\Microsoft HTML Help\\Content) I can see that \"ms-its\" has been added to the HTML. If I remove it and then compile the HHP directly from HTML Help Workshop then Help.ShowHelp() works as expected and images still work even if the CHM file is renamed. Is there any way to tell Flare not to add \"ms-its\"?
-
wclass
- Propellus Maximus
- Posts: 1238
- Joined: Mon Feb 27, 2006 5:56 am
- Location: Melbourne, Australia
Re: Images not displaying in CHM using C# Help.ShowHelp ...
Flare started adding this with v3.1 - there is a patch to stop this - see the thread at:Is there any way to tell Flare not to add \"ms-its\"?
http://forums.madcapsoftware.com/viewtopic.php?t=4653
The ms-its bits were added to the images and the style sheet references.
Margaret Hassall - Melbourne
Re: Images not displaying in CHM using C# Help.ShowHelp method
Is anyone having this problem with V4.0.16? I tried the 3.1 dlls from the kb and afterwards couldn't open the program. So I switched back to the originals.
lea
lea
lea
-
wclass
- Propellus Maximus
- Posts: 1238
- Joined: Mon Feb 27, 2006 5:56 am
- Location: Melbourne, Australia
Re: Images not displaying in CHM using C# Help.ShowHelp method
I've got no problem with V4 - you shouldn't need the patch (and a patch for a previous version is not likely to work). But if you rename the CHM file after it is generated, and you had the option to "Patch stylesheet and images ..." set on the Advanced tab, then you will still see the problem. I make sure that option is cleared.
Margaret Hassall - Melbourne
-
SteveS
- Senior Propellus Maximus
- Posts: 2090
- Joined: Tue Mar 07, 2006 5:06 pm
- Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
- Contact:
Re: Images not displaying in CHM using C# Help.ShowHelp method
...and welcome to the forums!
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
Re: Images not displaying in CHM using C# Help.ShowHelp method
Steve,
It has been so long that I forgot all about this issue and it seemed to be magically working on some machines. We ran across this problem again today and then I realized I never got it fixed. So, I wanted to let you know that your last response fixed my problem. I unchecked that option and it is working fine. Thank you so much and thanks for the welcome...hopefully you didn't think I was being ungrateful.
lea
PS I just found the option below that notifies me when a reply is posted.
It has been so long that I forgot all about this issue and it seemed to be magically working on some machines. We ran across this problem again today and then I realized I never got it fixed. So, I wanted to let you know that your last response fixed my problem. I unchecked that option and it is working fine. Thank you so much and thanks for the welcome...hopefully you didn't think I was being ungrateful.
lea
PS I just found the option below that notifies me when a reply is posted.
lea