Click here to Skip to main content
15,892,965 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have created .chm file in c#.net with software word2doc.
now, i want to attach that .chm file to my project's help option how can i do it?
please help.
thanks in advance.
Posted

To use your chm from code have a look to the Help namespace, and especially Help.ShowHelp.
For example:
C#
//this will open the chm file
System.Windows.Forms.Help.ShowHelp(this, "yourFile.chm");
//this will open the chm file and display a topic using its id
int id = 150;
System.Windows.Forms.Help.ShowHelp(this,"yourFile.chm",
    HelpNavigator.TopicId, id.ToString());
//this will open the chm file and display a html page
System.Windows.Forms.Help.ShowHelp(this, "yourFile.chm",
    HelpNavigator.Topic, "page.htm");


To use topic Ids, you must map the ids to the html pages. If you don't know how to do this, search in Word2Doc documentation. I don't know this software so I can't help further.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 4-Mar-11 11:52am    
Good answer, my 5.
--SA
You could include the file as a resource (bundle it into the executable), or set it to be output as content, then Process.Start it from your help menu.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900