0

This is a revision of my original post.

I have found various topics on displaying help and have incorporated Help.ShowHelp into my application without issue. But my question is about how do I display the help in something like tooltips as opposed to a separate help window? I want to have one source location for the help information (CHM) but be able to display it by hovering with a mouse (like tooltips) or by pressing F1 to bring up a help window navigated to the topic of interest.

I am not concerned right now with hooking up the F1 abilities because I have found plenty of information on how to do that. I am coming up short finding a way to provide something like tooltips with the information that is contained in the CHM file.

Original Post:

My basic question is can I pull text from a CHM file to use for my tooltips so that the information is not duplicated and potentially out of sync? I will also be hooking up the CHM file for F1 help and general Help as a menu or button item.

I found a post from a few years ago that is almost my exact question:

Integrate tooltips with CHM help in Windows app

It was asking about Delphi in that post and I am using C# but was otherwise my question. Unfortunately, the link to a possible explanation is broken. That question was never fully answered then. Does somebody have an answer or a link to an answer?

Dave

Community
  • 1
  • 1
Dave B
  • 78
  • 9
  • I am going to close this as a duplicate, please write a short note if you have any issues with that. – Jeremy Thompson Oct 28 '16 at 02:52
  • You can view the Delphi link using the time machine... http://web.archive.org/web/20090410044115/http://www.helpware.net/htmlhelp/how_to_whatsthis.htm – Jeremy Thompson Oct 28 '16 at 02:54
  • @JeremyThompson, I have edited the original post. I believe the question is different due to the tooltip involvement. – Dave B Nov 01 '16 at 23:19
  • Is your GoogleFu not working? *Honestly... all you need to do is drag a ToolTip control onto your form with 2 or 3 lines of code and hey presto!* **You have the link to get content from the CHM file... now all you need to do is show portions of the content in a tool tip.** If this question is now about tooltips then it would be a duplicate of a bunch of this QA's such as [this](http://stackoverflow.com/questions/168550/display-a-tooltip-over-a-button-using-windows-forms) and [this](http://stackoverflow.com/questions/1339524/c-how-do-i-add-a-tooltip-to-a-control). – Jeremy Thompson Nov 02 '16 at 00:30
  • @JeremyThompson, I appreciate you providing the links. I have used tooltips in the past and understand how they work so I am good there. My problem is I seem to have a brain fart about getting the content out of the CHM file. You mention I have the link to the content of the CHM file. I have the file name of the help file which I pass to ShowHelp if that is what you mean by the link. But I do not know how to extract a portion of the content of the help file. I appreciate any guidance you can provide. If it were a text file instead of a compiled file, I would know what to do. Thanks in advance. – Dave B Dec 16 '16 at 18:50
  • Just decompile it: https://www.codeproject.com/Articles/5419/Decompiling-CHM-help-files-with-C then read it using IO.File – Jeremy Thompson Dec 17 '16 at 05:21
  • @JeremyThompson, thank you. I will look at that. – Dave B Dec 17 '16 at 22:04

0 Answers0