Click here to Skip to main content
13,141,562 members (28,467 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I want to use my .chm file as help for my Windows application software and want to display it within a Form.
Can we embed our CHM File in a container control in visual studio 2005 window project.
If yes, which control and how?
Posted 21-Jan-11 23:17pm
sk saini7.9K
Updated 22-Jan-11 19:18pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

You can use the Help class[^]. This class provides a Showpopup window that you could use to display compiled files.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

A CHM file is a compiled HTML file - you probably know that - and is opened by the Help application. Normal browser controls will not open them for security reasons (they can contain code and run on the client machine).

It would be unusual to embed a CHM file in a tab, and I'm not sure it is possible without processing the file content yourself. Is there a good reason for wanting to do this specifically, or are you trying to solve a more general problem?
sk saini 22-Jan-11 5:40am
I have made CHM file from a Word file through a converter. I want to use it in my windows application. If its not possible to open it in tab page then can we open it in a windows form. If yes, How?
raj100mac 8-Apr-13 6:19am
can you plz detail me same code in java lang.if possible make it as fast as possible.....
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

You can open a CHM file in a new window through two ways:

1. Process.Start("chm file path")
2. Using HelpProvider control.
Rate this: bad
Please Sign up or sign in to vote.

Solution 4


To use a CHM as a help source for your application you can use the webbrowser control. You need to pass the correct url to the webbrowser control.


You could wrap that up in a class to make it easer to use. For example, filename is the full path to your CHM file, page is the name of the page inside the CHM, for example Index.Htm
public static string GetChmUrl(string fileName, string page)
    StringBuilder url = new StringBuilder();
    url.AppendFormat("mk:@MSITStore:{0}::", fileName);
    if(page.IndexOf('/') != 0) url.Append('/');
    return url.ToString();

and to pass it to your webbrowser:
webBrowser.Navigate(new Uri(GetChmUrl(mFileName, page)));

You can read these articles about help system in C#
Context Help Made Easy[^]

good luck


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170915.1 | Last Updated 23 Jan 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100