Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Compile HTML to CHM help file

Posted on 2010-08-19
23
Medium Priority
?
1,446 Views
Last Modified: 2013-11-27
Hello,

I want to compile HTML code and image resources to CHM help file.
0
Comment
Question by:Mohamed Abowarda
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
  • 3
  • +4
23 Comments
 
LVL 16

Expert Comment

by:kris_per
ID: 33478846
0
 
LVL 12

Author Comment

by:Mohamed Abowarda
ID: 33478964
@deisrobinson, @kris_per: I need to do this myself using C# or VB.NET without using another software.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 16

Accepted Solution

by:
kris_per earned 375 total points
ID: 33480078

Microsoft HTML Workshop comes with a command to which you can pass the html files and configuration files and it will create chm file. Check out this link => http://msdn.microsoft.com/en-us/library/ms524267(v=VS.85).aspx.

Then, in c# you need to create the project file (.hhp file) and content file (hhc file) and pass these to html workshop command (hhc) to create chm file.
0
 
LVL 12

Author Comment

by:Mohamed Abowarda
ID: 33708575
@kris_per: I need to compile the HTML and Images using C# or VB.NET code.
0
 
LVL 38

Assisted Solution

by:PaulHews
PaulHews earned 375 total points
ID: 33812316
Here is information on the CHM format.
http://www.russotto.net/chm/chmformat.html

I don't believe you will find sample code anywhere to create this format, and it looks pretty complicated, including using a custom version of the LZX algorithm for compression.  You would either have to write it yourself, hire someone to write it, or use HTML help compiler, which is free from Microsoft.  In fact all you really need is the hhc.exe command line tool and hha.dll in the same folder (which is the same procedure I use in the EE profile help compiler http://www.experts-exchange.com/Community_Support/Input/Q_22862698.html ).  MS Help Workshop contains instructions on the command line usage.
0
 
LVL 46

Expert Comment

by:aikimark
ID: 33812661
@Medo3337

Please explain the context of your question, especially why you have rejected the use of the HTML Help utility available (FOR FREE) from Microsoft.
0
 
LVL 12

Author Comment

by:Mohamed Abowarda
ID: 33833512
@aikimark: I want to compile the help file using C# or VB.NET application.

I have found API to do so but it's ".lib" file for C++ usage:
http://msdn.microsoft.com/en-us/library/ms669985(VS.85).aspx
0
 
LVL 46

Expert Comment

by:aikimark
ID: 33833586
@Medo3337

You can launch the utility from a C# or VB.Net application.
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 33834254
htmlhelp.lib is *not* for compiling chm files.  It's for displaying help from your C++ program.
0
 
LVL 16

Expert Comment

by:kris_per
ID: 33834452
@Medo3337

This HTML Help API you have mentioned is to embed the HTML help control inside another application and to configure how the html help window should be displayed and what page to display in the html help window, etc.

This API is not to create new CHM files...

As I mentioned above, you can call the HHC command from within a c# program and pass the .hhp(which is an xml file) and .html files to this command to create .chm file.
0
 
LVL 7

Assisted Solution

by:help-info
help-info earned 375 total points
ID: 33912060
BTW .hhp is not XML - more good old .ini format ;-)

As posted above (kris_per) calling the command line from within a C# programm is the way to go ..
See also:
http://www.help-info.de/en/Help_Info_HTMLHelp/hh_command.htm#Compile

Best regards
Ulrich Kulle
Microsoft Help MVP 2007-2009
0
 
LVL 12

Author Comment

by:Mohamed Abowarda
ID: 34029168
@help-info: I don't want to use command lines to do this, I would prefer C# or VB.NET code to compile the resources to .chm file.
0
 
LVL 46

Expert Comment

by:aikimark
ID: 34030696
In your opinion, would a Shell() function be the same as a command line?
0
 
LVL 12

Author Comment

by:Mohamed Abowarda
ID: 34030707
@aikimark: Using Shell to access what application?

I don't want the user to see black screen while processing.
0
 
LVL 46

Assisted Solution

by:aikimark
aikimark earned 375 total points
ID: 34030715
the compilation window can be hidden.
0
 
LVL 12

Author Comment

by:Mohamed Abowarda
ID: 34133006
@aikimark: Is that the only way that used in CHM creator softwares?
0
 
LVL 46

Expert Comment

by:aikimark
ID: 34133398
If you want to do it through object manipulation, I think you're out of luck.  I don't think there is an ActiveX object that wraps this.
0
 
LVL 5

Expert Comment

by:Tom Knowlton
ID: 36107989
I've requested that this question be deleted for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 36107990
Humbly submit that the question was indeed fully answered, even if the question asker did not like the solution:

http:#a33478846
http:#a33812316
http:#a33912060
http:#a34030715
0
 
LVL 12

Author Closing Comment

by:Mohamed Abowarda
ID: 36108440
In this question, I wanted a way to do that without using other console applications, but since it's alternative solution, I have accepted them.

Thanks everyone,
0

Featured Post

Quick Start: DOCKER

Sometimes you just need a Quick Start on a topic in order to begin using it.. this is just what you need to know to get up and running with Docker!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question