• 0

Integrating CHM files into .NET applications


Question

I have created some help documentation for my company's software, using Microsoft Assistance Markup Language; I have compiled this using Sandcastle Help File Builder, resulting in a decent CHM help file.

Now, by default, on a Windows system, this type of file opens in Microsoft HTML Help. I would like to find a way to display the contents of this help file in our .NET C# application, preferably on a panel component. It would be nice if the sidebar could be included (or a sidebar of sorts) which allows the user to select the topic to view or search the help file for content.

The files behind the compiled CHM file consist of AML files, rather than HTML files (due to me using the MAML mark-up language and not HTML); I am unsure whether I can get to any HTML files which may have been produced as a result of the compile.

I imagine there may be some sort of ActiveX control for this? I couldn't find any when searching. If not, is there any other way I can display this help file on a panel, as described?

Any help would be much appreciated :happy:

3 answers to this question

Recommended Posts

  • 0
  On 15/06/2010 at 14:51, The_Decryptor said:

You'd need to read the contents out, transform it into HTML then use the IE control to display it.

It'd probably be easier to just use raw HTML files on disk, save reading it back out.

Thank you for the suggestion and I think that's the route I'll have to go down if there is no ActiveX control or .NET function/s; however, are we sure that there is no other way to integrate the CHM file itself into the application? I'm aware I can use the HTMLBuilder and link to the CHM file so it opens externally, but that isn't an option for us.

What made me optimistic was finding this: http://msdn.microsoft.com/en-us/library/ms644670(v=VS.85).aspx However, when trying to incorporate that ActiveX control into a HTML page, a message informs me "This operation can only function within HTML help."

I'm sure there would be a way I could convert my AML files into seperate HTML files and then obviously create my own 'Contents' pane in a sidebar etc, but it would be so useful if there was some sort of control to manipulate a CHM file.

  • 0

You can use IE control to show CHM, but this does not work with AML files, since IE does not know how to display them.

private void button1_Click(object sender, EventArgs e)
{
    webBrowser1.Navigate(@"mk:@MSITStore:C:\Application\Help\Help.chm::/Index.htm");
}

54432026.th.jpg

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Yes and No... Yesterday there was someone on another forum asking what Linux version he should use for his transition from Windows, based on his graphical/video/3d needs. He got 10 different Linux distros and a handful of GUI's as an answer. Linux for the uninformed is just a hot mess regarding distributions. People are used to one Windows version. Or one Mac. Not having to choose from a pile of... what actually? And yes, Linux Mint would be a great replacement as long as you use the PC for the basics. Anything else will quickly result in frustration and searching on various forums. Linux isn't really the easy replacement for Windows. As I hate to say it, transitioning to a Mac is a way better experience. And I'm not entirely unfamiliar with Linux, having extensively dabbled with Mint and lately with Rocky for my Davinci Resolve experiments. It's still a pain... It really is..
    • Welcome on board!
    • iOS 26 leaks reveal AI-powered Messages, animated Music lock screen, and CarPlay redesign by Sagar Naresh Bhavsar A lot of these are reportedly changing this year for Apple. While the "Plus" model is expected to be replaced with the iPhone 17 Air, the iOS software is also expected to undergo a major branding change. Instead of iOS 19, Apple is rumored to introduce iOS 26 at the upcoming WWDC 2025 event on June 9. Not only iOS, but the change is expected across all platforms. Meaning, from this year, it could all be streamlined: iOS 26, iPadOS 26, macOS 26, watchOS 26, and more. However, since Apple Intelligence is still in its early stages, Apple is expected to introduce a slew of new features to apps such as Music, Messages, Notes, and CarPlay. According to 9to5Mac, Apple is preparing some "low-profile enhancements" for everyday apps, based on the information from previously accurate sources. As per the report, the Messages app could get an "Automatic Translation" feature that will make use of AI (artificial intelligence) to translate both incoming and outgoing messages. Plus, the Messages app could also gain a "Polls" feature, letting group chat members vote directly within the app. Apple Music is also expected to get a new full-screen animated lock screen artwork, enhancing the Now Playing widget by bringing a maximized look to the album art on the lock screen. The Notes app could also gain the ability to export notes in Markdown, a long-requested feature that third-party apps have supported for years. Apple recently introduced CarPlay Ultra, with some amazing changes, but that is limited to a few luxury cars at the moment. The standard CarPlay is expected to get a UI overhaul with iOS 26. While details remain under wraps, the new interface is speculated to reflect the sleek, glass-like design of iOS 26. Since these are still rumors, we suggest you take them with a pinch of salt. If you are confused about which iPhones will support iOS 26, you can check out the list of supported phones here.
    • Greetings!
    • Hmm, I'll give it a go
  • Recent Achievements

    • Week One Done
      Leonard grant earned a badge
      Week One Done
    • One Month Later
      portacnb1 earned a badge
      One Month Later
    • Week One Done
      portacnb1 earned a badge
      Week One Done
    • First Post
      m10d earned a badge
      First Post
    • Conversation Starter
      DarkShrunken earned a badge
      Conversation Starter
  • Popular Contributors

    1. 1
      +primortal
      261
    2. 2
      snowy owl
      158
    3. 3
      +FloatingFatMan
      145
    4. 4
      ATLien_0
      140
    5. 5
      Xenon
      131
  • Tell a friend

    Love Neowin? Tell a friend!