For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > February 2005 > help file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author help file
sarah

2005-02-28, 3:55 am

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.

Any ideas??
MikeD

2005-02-28, 3:55 am


"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/e...lpStartPage.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/defaul...&NoWebContent=1

How To Create Context-Sensitive HTML Help in a Visual Basic App
http://support.microsoft.com/defaul...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/e...Application.asp


--
Mike
Microsoft MVP Visual Basic





Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com