In Windows Forms the Help Class Library in System.Windows.Forms provides the 'ShowHelp method which makes it easy to display a .chm file in
[1] the ContainerControl/Form of your choice:
private void btnShowCHMFile_Click(object sender, EventArgs e)
{
Help.ShowHelp(pnlCHMHost, @"file:C:\Program Files (x86)\Internet Download Manager\scheduler.chm");
}
This is working code that will open the specified .chm file in
[1] a specified Panel.
Reference: [
^].
[1]Well, it doesn't really open the .chm file "in" a container control as you might expect in Windows Forms: it doesn't add a Control to the ControlsCollection of its specified target container, and it doesn't give you any valid reference to the chm viewer's window so that you could re-size it, etc. It creates a full-fledged Window, which is movable, and can be moved outside the boundaries of its specified 'Parent container without being clipped.