Re: help file

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: MikeD (nobody_at_nowhere.edu)
Date: 02/28/05


Date: Sun, 27 Feb 2005 22:14:20 -0500


"sarah" <sarah@discussions.microsoft.com> wrote in message
news:BC123D47-4AF7-4940-A32B-CD979277C0CB@microsoft.com...
> i want to add a help file to my appliction that just has a short walk
through
> that explains how the system works and the different screens.
> I have added a link from the menu at the top under help, however i am not
> sure what the best way is to show the help file.
> I could open a word document but i am sure there must be a better way of
> doing it that is more similar to other windows applications.

Your Help can really be anything you want. For example, you could just add
a form to your app which has a textbox and all the "help" is assigned to the
textbox's Text property. That'd be Help at it's simplest (well, I suppose
the absolute simplest would be just a README.TXT file). You could also
merely create an HTML file (or maybe even several HTML files) and open it
using the user's default web browser. You mentioned a Word document. That'd
possibly be OK. You could use Automation with Word to open the file. The
downside to this is that the user needs an application that supports
Automation and can open Word documents (strictly speaking, it wouldn't have
to be MS Word).

However, what you're probably talking about is either a .HLP (and older
Windows Help file, generally referred to as WinHelp) or a .CHM file (a
Compiled HTML Help file, generally referred to as HTML Help).

WinHelp source files are RichTextFormat files created using Word or other
apps that support certain features. For example, to create topics (think of
each topic as a different "page" in your Help) you need to create footnotes.
This means you can't use Wordpad (even though it can create .RTF files)
because Wordpad does not support footnotes. Items such as hypertext links
to other topics and popup links are done via various styles assigned to text
with some additional information following (and usually as hidden text).
For example, to create a hypertext jump to another topic, apply the double
underline style to the text you want to serve as the hotspot (what the user
clicks on). This is the text that appears underlined in the help file.
Immediately after this text, type the Topic ID (set via a footnote) of the
topic you want to jump to, highlight just the ID and then apply the hidden
style to that. Yes, it can be cumbersome and involved, but once you learn
it, it's really not that bad. Once you've got the .RTF file created
(usually, everything is in one .RTF file) you compile it into a .HLP file
using Help Workshop (included with VB but I don't think it's installed by
default)

.CHM files are Compiled HTML Help files. As you can probably guess, they
are created from HTML files, compiled into a single .CHM file. Usually, each
HTML file is its own topic, so your help project will most likely consist of
many HTML files. You use the HTML Help Workshop program (which I believe is
an option to install during VB's Setup) to compile .CHM files. HTML Help
Workshop contains it's own Help on how to write HTML Help files. So it'd be
best for you to install that and consult its help for more information on
how to write the HTML files. You can also access it online:

http://msdn.microsoft.com/library/en-us/htmlhelp/html/hworiHTMLHelpStartPage.asp

If you're going to go with a Windows Help system (as opposed to just a Word
document, assigning text to a textbox), HTML Help is probably the better
choice. WinHelp(the .HLP files) is based on 16-bit Windows and mostly
outdated (still supported, though, as far as I know, even under WinXP).

Now, once you've got an .HLP or .CHM file created, you need to show it from
VB. VB has built in support for this, but it could be different depending on
the Help format you've chosen and what version of VB you're using. VB6
supports HTML Help files (IOW, you can assign a .CHM file to various "help"
properties and VB6 apps will show it). VB5 and under do not natively
support .CHM files but it's still possible to use them. See the following
KB articles:

HOWTO: Use HTML Help API in a Visual Basic Application
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q183/4/34.ASP&NoWebContent=1

How To Create Context-Sensitive HTML Help in a Visual Basic App
http://support.microsoft.com/default.aspx?scid=kb;en-us;189086

If you're using VB6, you should also consult VB's Help (MSDN Library) on how
to add Help to your apps. Here's a link to the online version of that:

http://msdn.microsoft.com/library/en-us/vbcon98/html/vbconAddingHelpToYourApplication.asp

-- 
Mike
Microsoft MVP Visual Basic


Relevant Pages

  • Re: Need help with HTML Help
    ... > Is .chm file viewer integral part of Windows? ... HTML Help viewer). ... > When I execute above ShellExecute, the .chm file opens but not on selected ... ShellExecute is not the best way to open HTML Help. ...
    (microsoft.public.vb.general.discussion)
  • Re: cannot view chm help documents
    ... the file with .reg extension. ... ;CHM file type association fix ... Microsoft MVP [Windows Desktop Experience] ... associations to open the file and it's set to default (microsoft HTML Help ...
    (microsoft.public.windowsxp.help_and_support)
  • chm production from C/C++ project
    ... Fles" and "HTML Help Topics". ... I can now build the CHM file by right clicking ... on the hhp file and selecting Compile. ...
    (microsoft.public.vstudio.development)
  • Chm files cant be read
    ... system is shot on this machine. ... Regarding books online, they used to work ok on this computer (W2k Pro Sp4, ... Also on this computer I now unable to open any chm file either from a menu ... These problems apply to all help files using the HTML help system on this ...
    (microsoft.public.win2000.general)
  • Re: Help Support for Windows Applications
    ... 2.How to create and maintain help for a new Windows application. ... need to create a help file using the HTML Help Complier components. ... Microsoft Online Community Support ... You can send feedback directly to my manager at: ...
    (microsoft.public.dotnet.general)