Link to home
Start Free TrialLog in
Avatar of khaledc
khaledc

asked on

VB 5/6 Help Writer

I am interested in writing a Help File for a Very Big Visual Basic Application (Version 5/6). Can anyone tell me what is the easiest way to do that or if there is some easy program that can do the job.
(Please do not lock the question until I accept your comment as an answer).
Regards
Avatar of khaledc
khaledc

ASKER

Edited text of question
You could use Html Help WorkShop that ships with VB6.
Avatar of khaledc

ASKER

What about VB5?
As I know it supports VB5... !!! Html !!!
It's the same as in microsoft site
Avatar of khaledc

ASKER

How can I find it in VB5 (Documentation and code on how to use it).
I never used it but I started to read the program help. It's seems to be very easy.


copy the following to htmp page
you have here step-by-step instructions for building your first html help file
---- Start ----
<html>
<head>

<title>Inside Visual Basic / Integrating HTML Help into your applications</title>

<!--Inside Visual Basic-->
<META HTTP-EQUIV="Description" NAME="Description" CONTENT="Tips and techniques for people developing applications with Microsoft Visual Basic.">

<META HTTP-EQUIV="Keywords" NAME="Keywords" CONTENT="Visual Basic,Visual Basic for
Applications,VBA,technique,tip,Microsoft,developer,technical support,Fawcette,Pinnacle">


<style type="text/css">

yllwfont {color:#FFFF33}

leftnav { color: white;}

leftbig { color: #FFFF00;}

pagenow { color: #F7EB82;}

zdcolor { color: #FFFF82;}              

nav     { color: #F7EB82;}                



A:link { color: #004080 }       /* unvisited link */

A:visited { color: #004080 }   /* visited links */

A:active { color: #CA0000 }    /* active links */

A:hover {color:"#A32525";}

</style>
<!-- ZD Journals All Product Meta -->
<META HTTP-EQUIV="Description" Name="Description" CONTENT="ZD Journals, a division of Ziff-Davis, is dedicated to providing the most up-to-date, and comprehensive information for computer users and administrators of all levels. Each publication is written by our team of experts who investigate every nook and cranny of your software to provide the tips, tricks, and techniques to help you get the most from your software investment.">

<META HTTP-EQUIV="Keywords" Name="Keywords" CONTENT="ZD,ZD Journals,ZDJournals,ZDJ,Ziff-Davis,ZDTips,ZD Tips,ZDJBuzz,ZDNET,Cobb,Cobb Group,the cobb group,The Cobb Group,software support,software publications,computer publications,internet publications,software tips,computing tips,computing techniques,newsletter,publication,journal,how-to journals,newsletters,software,technical,tips,how-to,tricks,help,answers,information,ZD Journals Home Page,journals,newsletters,software,technical,tips,how-to,tricks,help,answers,information,interactive,applications,development,computing,computer information,learn,learning,train,training,edu,education,reference,subscriptions,subscription,questions">

<META NAME="WEB_ELEMENT_ID" CONTENT="zdjivb98b1">
<META NAME="WEB_COPY_DATE" CONTENT="110198">
<META NAME="WEB_AUTHOR" CONTENT="ZDJ">
<META NAME="WEB_PRODUCT" CONTENT="Microsoft Visual Basic">
<META NAME="WEB_PUBLICATION" CONTENT="Inside Visual Basic">

<style type="text/css">

yllwfont {color:#FFFF33}

leftnav { color: white;}

leftbig { color: #FFFF00;}

pagenow { color: #F7EB82;}

zdcolor { color: #FFFF82;}              

nav     { color: #F7EB82;}                



A:link { color: #004080 }       /* unvisited link */

A:visited { color: #004080 }   /* visited links */

A:active { color: #CA0000 }    /* active links */

A:hover {color:"#A32525";}

</style>
<style type="text/css">

yllwfont {color:#FFFF33}

leftnav { color: white;}

leftbig { color: #FFFF00;}

pagenow { color: #F7EB82;}

zdcolor { color: #FFFF82;}              

nav     { color: #F7EB82;}                



A:link { color: #004080 }       /* unvisited link */

A:visited { color: #004080 }   /* visited links */

A:active { color: #CA0000 }    /* active links */

A:hover {color:"#A32525";}

</style>
</head>

<BODY background="/graphics/zdjback.gif" bgcolor="#FFFFFF"
link="#0000CC" vlink="#CC0000">

<table border="0" cellpadding="0" cellspacing="0" width="600">
    <tr>
        <td valign="top" rowspan="7">
<A HREF="/index.htm"><IMG SRC="/graphics/zdjbug.gif" height="33" width="88" border=0 alt="[ ZD Journals ]"></A><BR>

<BR>
<CENTER>

<A HREF="/forms/ivb/cu2001.htm"><IMG SRC="/graphics/free2.gif" width=70 height=50 border=0 alt="[ Click here for a FREE ISSUE! ]"></A><BR>

</CENTER>

<BR>
<BR>
</center>
<FORM ACTION="http://search.zdjournals.com/cgi-bin/htsearch"" METHOD="POST">
  <INPUT TYPE="HIDDEN" NAME="words" VALUE="">
  <INPUT TYPE="TEXT" NAME="words" SIZE="10"><center>
 <INPUT TYPE="image" SRC="/graphics/testsearch.gif" height="22" width="57" border=0" alt="Enter a Word of Phrase to search the entire ZD Journals Site"></center>
</FORM>
<IMG SRC="/graphics/dot_clear.gif" WIDTH=88 HEIGHT=7>

<center>
<a href="/publicat.htm"><img src="/graphics/prodcat.gif" height="50" width="75" border=0></a>
</center>

<IMG SRC="/graphics/dot_clear.gif" WIDTH=88 HEIGHT=7>
<font face="arial, helvetica" size=2 color=#FFFF82>
<span class="zdcolor">
<b><span class="zdcolor">Channels</b></font>
</span>

<span class=leftnav>
<br>
<A HREF="/channels/business.htm" title="[ Explore the Net, Corel WordPerfect Suite, Inside Microsoft Access, Inside Microsoft Excel, Inside Microsoft Office 97, Inside Microsoft Word ]"><font face="arial, helvetica" size="1" color="White"><span class="leftnav">Business Tools</font></A>
<br>
<A HREF="/channels/opsys.htm"  title="[ Inside Windows 98, Inside Windows 95, Exploring Winodws NT, Windows 95 Profesional, Inside NetWare, Inside Solaris, The Mac Authority ]"><font face="arial, helvetica" size="1" color="White"><span class="leftnav">Operating Systems</font></A>

<A HREF="/channels/program.htm"  title="[ Inside Visual Basic, C ++ Builder, Delphi Developer's Journal, Visual J ++ ]"><font face="arial, helvetica" size="1" color="White"><span class="leftnav">Programming</font></A>
<br>
<A HREF="/channels/designer.htm" title="[ Inside Adobe PageMaker, Inside Adobe Photoshop, The Mac Authority  ]"><font face="arial, helvetica" size="1" color="White"><span class="leftnav">Design</font></A>
<br>
<A HREF="/channels/internet.htm" title="[ Explore the Net with Internet Explorer, Internet Search Advantage, Inside The Internet, ]"><font face="arial, helvetica" size="1" color="White"><span class="leftnav">Internet</font></A>
<br>
<A HREF="/channels/onlinebus.htm" title="[ eCommerce @lert, Online Investment Adviser, Hi-Tech Traveler ]"><font face="arial, helvetica" size="1" color="White"><span class="leftnav">Online Business</font></A>
<br>
 <A HREF="/channels/enterprise.htm" title="[Inside NetWare, Exploring Oracle, Inside Solaris ]">  <font face="arial, helvetica" size="1" color="White"><span class="leftnav">Enterprise</font></A></span>
<br>&nbsp;<br>





<font face="arial, helvetica" size=2 color=#FFFF82>
<span class="zdcolor">
<b>ZD Journals</b></span></font>
<IMG SRC="/graphics/dot_clear.gif" WIDTH=30 HEIGHT=1><br>
<A HREF="/channels/message.htm"  title="[ Have your questions answered by others in the field ]"><font face="arial, helvetica" size="1" color="White" ><span class="leftnav">Online Community</font></A>
<IMG SRC="/graphics/dot_clear.gif" WIDTH=1 HEIGHT=1><br>
<A HREF="/content/checkitout.htm" title="Archive Of the What's New Section"><font face="arial, helvetica" size="1" color="White"><span class="leftnav">Check it Out</font>
</SPAN></A>

<IMG SRC="/graphics/dot_clear.gif" WIDTH=1 HEIGHT=1><br>
<A HREF="http://search.zdjournals.com/" title="Advanced search of the ZD Journals site"><font face="arial, helvetica" size="1" color="White"><span class="leftnav">Advanced Search</font>
</SPAN></A> <br>
<span class="leftnav">
  <A HREF="/cobbcr.htm" title="Contact ZD Journals"><font face="arial, helvetica" size="1" color="White"><span class="leftnav">Contact us</font></A>
<br>
<IMG SRC="/graphics/dot_clear.gif" WIDTH=1 HEIGHT=1><br>
  <A HREF="/whoweare.htm" title="About ZD Journals"><font face="arial, helvetica" size="1" color="White"><span class="leftnav">About ZD Journals</font></a>
<br>
<IMG SRC="/graphics/dot_clear.gif" WIDTH=1 HEIGHT=1><br>
<A HREF="http://www.zdjournals.com" title="Go to the ZD Journals Home Page"><font face="arial, helvetica" size="1" color="White"><span class="leftnav">ZD Journals Home</font></A>
<br>
<IMG SRC="/graphics/dot_clear.gif" WIDTH=1 HEIGHT=1><br><a href="http://www.zdnet.com/zdhelp/tip_help/tip_stump_help.html"><font face="arial, helvetica" size="1" color="White"><span class="leftnav">
Stump Jeff!</a></font>
</SPAN></A>
<p>





<br>
      <p><center>
<A HREF="http://www.zdu.com/">
<IMG SRC="/graphics/zdu-btn2.gif" height="49" width="50" border=0 alt="[ ZDU ]"></A>
<p>

<A HREF="http://www.zdtips.com/">
      <IMG SRC="/graphics/zdt-btn.gif" WIDTH=88 HEIGHT=31 BORDER=0 ALT="[ ZDTips ]"></A>
<p>

<A HREF="/zdjbuzz/"><IMG SRC="/zdjbuzz/graphics/zdjbuzzbutton.gif" border=0 alt="[ ZDJBuzz ]" height="35" width="90"></A><BR>
<p>
<a href="http://www.zdnet.com/zdhelp/tip_help/tip_help.html"><img src="/graphics/tz-btn.gif" height="31" width="88" border=0 alt="[ TipZone ]"></a>

</center>


</TD></CENTER>
  </td>
<!--Gutter cell-------------------------------->
<TD rowspan="7"><IMG SRC="/graphics/dot_clear.gif" width=20 height=20></TD>
    </tr>
    <tr>
        <td colspan="2">
<CENTER>
<A HREF="http://ads.zdnet.com/cgi-bin/accipiter/aamr.exe/RGROUP=r361" target="_top">
<IMG SRC="http://ads.zdnet.com/cgi-bin/accipiter/aami.exe/RGROUP=r361" WIDTH=468 HEIGHT=60 border=1 alt="Advertisement"></A><p>

<center>

<table Cellpadding=0 cellspacing=0 width=470 border=0 valign=bottom align=bottom>
<tr>
      <td align=bottom valign=middle>
<a href="/forms/ivb/cu2001.htm"><IMG SRC="/ivb/graphics/ivb-logo.gif" HEIGHT="47" WIDTH="335" ALT="Inside Visual Basic" BORDER="0"></a>
</td>

      <td>
<a href="https://secure.zdjournals.com/ivb/cdb2001.htm"><img src="/graphics/ads/ivbcdad.gif" height="100" width="100" border=0></a>
      </td>
</tr>
</table>



<table border="0" Cellpadding=0 cellspacing=0 width=470 height="15" align=center valign=top>
<tr>
      <td>
<center>
<a href="/ivb"><font face="arial, helvetica" size="1">IVB Home</font></a>

<font face="arial, helvetica" size="1">&nbsp;&#149;&nbsp;</font>

<a href="/ivb/backissu.htm"><font face="arial, helvetica" size="1">Back Issues</font></a>

<font face="arial, helvetica" size="1">&nbsp;&#149;&nbsp;</font>

<a href="/forms/ivb/cu2001.htm"><font face="arial, helvetica" size="1">Free Issue</font></a>

<font face="arial, helvetica" size="1">&nbsp;&#149;&nbsp;</font>

<a href="/ivb/code.htm"><font face="arial, helvetica" size="1">Source Code</font></a>

<font face="arial, helvetica" size="1">&nbsp;&#149;&nbsp;</font>

<a href="/ivb/guide.htm"><font face="arial, helvetica" size="1">Writer's Guidelines
</font></a>


</center>
      </td>
</tr>
<tr>
      <td>
<center>

<font face="arial, helvetica" size="1"><a href="Mailto:visual_basic@zdjournals.com">Email the Editor</a></font>

<font face="arial, helvetica" size="1">&nbsp;&#149;&nbsp;</font>

<a href="http://www.zdtips.com/ivb/zdt-f.htm"><font face="arial, helvetica" size="1">IVB Tips</font></a>

<font face="arial, helvetica" size="1">&nbsp;&#149;&nbsp;</font>

<a href="/m_ivb"><font face="arial, helvetica" size="1">Message Board</font></a>

<font face="arial, helvetica" size="1">&nbsp;&#149;&nbsp;</font>

<a href="https://secure.zdjournals.com/ivb/cdb2001.htm"><font face="arial, helvetica" size="1">CD Offer</font></a>

<font face="arial, helvetica" size="1">&nbsp;&#149;&nbsp;</font>

<a href="https://secure.zdjournals.com/ivb/cb4000.htm"><font face="arial, helvetica" size="1">Subscribe</font></a>
      </td>
</tr>
<tr>
<td><center>
<br>
<form method="post" action="http://search.zdjournals.com/cgi-bin/htsearch">
       <input type="hidden" name="config" value="htdig">
  <INPUT TYPE="TEXT" NAME="words" SIZE="15">
<INPUT TYPE="image" SRC="/ivb/graphics/ivbsearch.gif" height="23" width="133" border=0" alt="Search the Inside Visual Basic Site">
<input type="hidden" name="restrict" value="http://www.zdjournals.com/ivb">
</FORM>

</center>
</td>
</tr>
</table>
</center>
<p>

</CENTER>

<h5>November 1998</h5>
<!-- ---------------START   CONTENT------------------------------      -->

<H2>Integrating HTML Help into your applications</H2>
<B>by Sant S. Pramoda</B>
<P>
<I>You can download our sample files as part of the file nov98.zip from our Web site. Visit <A HREF="Http://www.zdjournals.com/ivb">www.zdjournals.com/ivb</A> and click on the Source Code hyperlink. </I>
<P>
Have you ever peeked into the Internet Explorer (IE) 4.0 Help and wondered how to build a Help system like that for your application? In this article, we'll show you how to build an HTML-based help system using Microsoft's HTML Help Workshop. We'll also explore how to call the Help file you built from your VB application by using HTML Help Workshop--you'll build a simple <TT>CHelp</TT> wrapper class to access the Help files.
<P>
Microsoft introduced HTML Help in August 1997 as a successor to WinHelp. Since it's relatively new, it hasn't been used in many applications other than IE. However, it's expected that all Microsoft's future products will use HTML Help, starting with Windows 98. You need to have IE 3.02 or higher installed in order for HTML Help to work; to take advantage of the full functionality, you need the latest version of IE.

<H3>The basics</H3>
A typical HTML Help window consists of three panes, as shown in Figure A. (This is sometimes referred to as a tripane window.) the top of the window is the ToolBar pane, which contains the toolbar buttons. To the bottom-left is the Navigation pane; it's made from the <TT>HHCtrl.OCX</TT> ActiveX control that's responsible for Contents, Index, and Search capabilities. The bottom-right pane is the Topic pane, which acts as a container for HTML documents.
<P>

<B>Figure A: </B>
Internet Explorer 4.0 Help uses a tripane window.<BR>
<IMG SRC="ivb98b1a.gif" ALIGN="" WIDTH="470" HEIGHT="269" BORDER="0" ALT="[ Figure A ]">
<P>

<H3>HTML Help Workshop</H3>
To author HTML Help files, you can use HTML Help Workshop, which is a tool developed by Microsoft. HTML Help Workshop is available for download from <A HREF="http://www.microsoft.com/workshop/author/htmlhelp/default.asp">www.microsoft.com/workshop/author/htmlhelp/default.asp</A>. In this section, we'll show you how to build a simple Help system using this tool. Before you begin, you need to install HTML Help Workshop on your machine. For a description of the different file types and extensions used in the HTML Help, please refer to Table A.
<P>

<B>Table A: </B>Files used in HTML Help<BR>
<Table border=2 bgcolor="#ccccff" cellpadding=4>
<TR bgcolor="#6666ff"><TD><B>Extension</B></TD><TD><B>Type</B></TD></TR>
<TR><TD>HHP</TD><TD>Help project</TD></TR>
<TR><TD>HHC</TD><TD>Table of contents</TD></TR>
<TR><TD>HHK</TD><TD>Index</TD></TR>
<TR><TD>CHM</TD><TD>Compiled Help</TD></TR>
<TR><TD>HTM</TD><TD>Individual Help</TD></TR>
<TR><TD>H</TD><TD>Header files</TD></TR>
</Table>

<H4>Creating your first HTML Help project</H4>
Before you can build your Help system, you'll need to create all the HTML files that the system will need. Then, create an \HTMLHelp directory and save the HTML files there--this will be your project directory.
<P>
Now, open HTML Help Workshop and choose the File | New menu item. In the resulting New dialog box, select Project and click OK. The New Project Wizard will start. Follow the steps in this Wizard to create your project. Be sure to check the HTML Files option in the New ProjectExisting Files dialog box, to add your HTML files to the project. Click the Finish button to create your project. Figure B shows a typical HTML Help Workshop window.
<P>

<B>Figure B: </B>Here's a standard HTML Help Workshop window.<BR>
<IMG SRC="ivb98b1b.gif" ALIGN="" WIDTH="459" HEIGHT="433" BORDER="0" ALT="[ Figure B ]">
<P>

The HTML Help Workshop's main window consists of four tabs--Project, Contents, Index, and Help--and a set of buttons for each tab. You can use the Project tab to change project options, add or remove topic files, add or modify window definitions, and set options for the <TT>HTMLHelp</TT> API. Setting up Window definitions and <TT>HTMLHelp</TT> API are important for VB developers. We'll explore how to set these options later.


<H4>Adding table of contents and index files</H4>
A table of contents file defines the contents you see when you click the Contents tab in a Help file. The contents are usually organized in a tree structure, with headings, subheadings, and pages.
<P>
To add a table of contents file to your project, click the Contents tab to see the Table Of Contents Not Specified dialog box. Select Create A New Contents File to create a blank table of contents file. Now, you can add your contents using the Insert Heading and Insert Page buttons. In the dialog boxes that appear when you select these options, you can associate HTML files to the headings and pages. You can also edit, delete, or organize your headings and pages using the Edit, Delete, and Move Selection buttons.
<P>
The index file defines the index entries (keywords) you see when you click on the Index tab. To add an index file to your project, click on the Index tab to open the Index Not Specified dialog box. Select Create New Index to create a blank index file. You can add your keywords using the Insert A Keyword button and associate an HTML file for that keyword. You can also edit, delete, or organize your keywords using the Edit, Delete, and Move Selection buttons.

<H4>Window definitions and <TT>HTMLHelp</TT> API information</H4>
Window definitions let you define the appearance of a help window. You can specify which buttons to show on the toolbar, which tabs to show in the navigation pane, and a set of other properties, which alter the look of a Help window. You can set up as many window definitions as you want, but you must have a default window definition.
<P>
When you call the <TT>HTMLHelp</TT> API from VB, you can refer to these window definitions and show the Help window in different styles. Click on the Project tab, then click the Add/Modify Window Definitions button. In the Add A New Window Type dialog box, type <I>MyWindow</I> (or any other name) and click OK. In the Window Types dialog box, you can select different tabs to change the buttons, styles, and so on When you click OK, a new window definition will be created.
<P>
If you need to include a Search tab in your Help file, click the Navigation Pane tab and select the Add Search Tab option. When you click OK, you'll be taken through a Wizard. In the second step, select Compile Full-text Search Information to let the Help compiler build the entries for the Search tab when you compile the project.
<P>
The <TT>HTMLHelp</TT> API Information button sets up information for context-sensitive Help. When you click this button, you'll see the <TT>HTMLHelp</TT> API information dialog box. You can associate a header file--which defines all context IDs--in the Map tab. The current version of <TT>HTMLHelp</TT> accepts only C-type header files. Figure C shows the contents of a typical header file in Notepad.

<P>
<B>Figure C: </B>
This is a header file for use with the <TT>HTMLHelp</TT> API.<BR>
<IMG SRC="ivb98b1c.gif" ALIGN="" WIDTH="366" HEIGHT="191" BORDER="0" ALT="[ Figure C ]">
<P>

You can use the Alias tab to associate the Help context ID constants defined in the header file to HTML files, as shown in Figure D. When you call <TT>HTMLHelp</TT> from VB with a Help context ID constant, you can navigate to the HTML file associated with that constant.

<P>
<B>Figure D: </B>Associate context IDs with HTML files in the Alias tab.<BR>
<IMG SRC="ivb98b1d.gif" ALIGN="" WIDTH="374" HEIGHT="258" BORDER="0" ALT="[ Figure D ]">
<P>
You can also set up text pop-ups using the Text Pop-ups tab. For more details on setting up text pop-ups, refer to the online Help that comes with the HTML Help Workshop.


<H4>Compiling your Help project</H4>
Before you compile, click the Change Project Options button in the Project tab and select the Default File for your project in the General tab. You can also click on the Files tab to change the name of the compiled file or to verify the table of contents and index files. Click the Save All Project Files And Compile button to compile your file.
<P>
By default, your compiled help file will have the same name as your project file--but it will have a CHM extension. If there are any errors during compile, you'll see them in the window on the right side. Those errors are self-explanatory. After a successful compilation, you're ready to call your Help system from VB.

<H3>Calling Help from VB</H3>
You can use the <TT>HTMLHelp</TT> API function to display Help files from VB. <TT>HTMLHelp</TT> is part of the hhctrl.ocx. It's modeled after the <TT>WinHelp</TT> API function--so, if you're familiar with <TT>WinHelp</TT>, you won't have any difficulty transitioning to <TT>HTMLHelp</TT>. In this section, we'll show you how to wrap the <TT>HTMLHelp</TT> API in a class (<TT>CHelp</TT>) so that you can reuse it.
<P>
To begin, create a class and name it <TT>CHelp</TT>. Enter the following code in the General Declarations:

<PRE>
'// Constant declarations
Private Const HH_DISPLAY_TOPIC = &H0
Private Const HH_HELP_CONTEXT = &HF

'// API declaration
Private Declare Function HtmlHelp Lib _
  "hhctrl.ocx" Alias "HtmlHelpA" _
  (ByVal hwndCaller As Long, _
  ByVal pszFile As String, _
  ByVal uCommand As Long, ByVal dwData As Long) _
  As Long
</PRE>

The <TT>CHelp</TT> class has one method--<TT>Show</TT>, in Listing A--that takes a filename as its first argument. This filename could be a compiled file (CHM) or an HTML file (HTM). In case of a compiled file, you can use the next two arguments to further manipulate the Help window. The second argument, <TT>WindowPane</TT>, is optional. It refers to the window definitions we discussed earlier, and can be used to show different window types. The third argument is the <TT>ContextID</TT>, which is also optional. You can use this argument to supply <TT>ContextID</TT> when context-sensitive help is called.
<P>
<B>Listing A: </B><tt>CHelp_Show</TT> method<BR>
<Pre>
Public Sub Show(NewFile As String, _
  Optional WindowPane As String, Optional ContextID)

Dim strFile As String
Dim hRet As Long

strFile = NewFile

If Len(WindowPane) Then
'you need to include > symbol with the file name
  strFile = Trim(strFile) & _ ">"&Trim(WindowPane)
End If

If IsMissing(ContextID) Then
  hRet =HtmlHelp(0, strFile, _ HH_DISPLAY_TOPIC, _
    ByVal 0&)
Else
  hRet = HtmlHelp(0, strFile, _ HH_HELP_CONTEXT, _
  ContextID)
End If
End Sub
</Pre>

As you can see in the listing, you must include a > symbol with the filename, if you're using a <TT>WindowPane</TT>. The <TT>HH_DISPLAY_TOPIC</TT> command displays a topic in the Help window. <TT>HH_HELP_CONTEXT</TT> displayed topics associated with a <TT>ContextID</TT>. On success, the <TT>HTMLHelp</TT> API will return the handle of the Help window created.


<H4>Using the CHelp class</H4>
Once you create an instance of the <TT>CHelp</TT> class, all you need to do is call the <TT>Show</TT> method and pass the name of the compiled file as the parameter. You can also pass the name of an HTML file to open it directly in the Topics pane without the Navigation and ToolBar panes.
<P>
Listing B shows how to call the <TT>Show</TT> method in the <TT>Click</TT> procedure of a button. You can play with other parameters to manipulate the Help window.
<P>

<B>Listing B: </B>Using <TT>CHelp</TT> class<BR>

<PRE>Private Sub cmdShow_Click()

Dim strFile As String
Dim objHelp As CHelp
   
Set objHelp = New CHelp
   
strFile = App.Path & "\HelpFiles\HTMLHelp.chm"

Call objHelp.Show(strFile, "MyWindow")

Set objHelp = Nothing
End Sub</PRE>

<H3>Conclusion</H3>
HTML Help is definitely the Help of the future--it takes a normal Help system to a new level. Since it's HTML based, you can mix and match pictures, movies, animation, and multimedia to create a rich set of Help files. The possibilities are endless.

<P>
</Td>
<!--end content column---------------------------------->
</TR>
<TR>
<td>
<CENTER>


<br>&nbsp;<SCRIPT LANGUAGE="JavaScript">
                      <!-- Beginning of JavaScript Applet -------------------
                      function go(form)
                      {
                      var destHREF=""
if (form.where.selectedIndex==1)
                      destHREF="/asp";
if (form.where.selectedIndex==2)
                      destHREF="/aov";
if (form.where.selectedIndex==3)
                      destHREF="/cpb";
if (form.where.selectedIndex==4)
                      destHREF="/cw7";
if (form.where.selectedIndex==5)
                      destHREF="/ddj";
if (form.where.selectedIndex==6)
                      destHREF="/eca";
if (form.where.selectedIndex==7)
                      destHREF="/etn";
if (form.where.selectedIndex==8)
                      destHREF="/dbm";
if (form.where.selectedIndex==9)
                      destHREF="/ewn";
if (form.where.selectedIndex==10)
                      destHREF="/iac";
if (form.where.selectedIndex==11)
                      destHREF="/ial";
if (form.where.selectedIndex==12)
                      destHREF="/fmp";
if (form.where.selectedIndex==13)
                      destHREF="/fre";
if (form.where.selectedIndex==14)
                      destHREF="/iai";
if (form.where.selectedIndex==15)
                      destHREF="/lss";
if (form.where.selectedIndex==16)
                      destHREF="/ima";
if (form.where.selectedIndex==17)
                      destHREF="/ime";
if (form.where.selectedIndex==18)
                      destHREF="/mfp";
if (form.where.selectedIndex==19)
                      destHREF="/mo9";
if (form.where.selectedIndex==20)
                      destHREF="/o97";
if (form.where.selectedIndex==21)
                      destHREF="/imp";
if (form.where.selectedIndex==22)
                      destHREF="/win";
if (form.where.selectedIndex==23)
                      destHREF="/w95";
if (form.where.selectedIndex==24)
                      destHREF="/w98";
if (form.where.selectedIndex==25)
                      destHREF="/msw";
if (form.where.selectedIndex==26)
                      destHREF="/inw";
if (form.where.selectedIndex==27)
                      destHREF="/ipm";
if (form.where.selectedIndex==28)
                      destHREF="/ips";
if (form.where.selectedIndex==29)
                      destHREF="/ipp";
if (form.where.selectedIndex==30)
                      destHREF="/qua";
if (form.where.selectedIndex==31)
                      destHREF="/sun";
if (form.where.selectedIndex==32)
                      destHREF="/int";
if (form.where.selectedIndex==33)
                      destHREF="/ivb";
if (form.where.selectedIndex==34)
                      destHREF="/awd";
if (form.where.selectedIndex==35)
                      destHREF="/iba";
if (form.where.selectedIndex==36)
                      destHREF="/isa";
if (form.where.selectedIndex==37)
                      destHREF="/mac";
if (form.where.selectedIndex==38)
                      destHREF="/mit";
if (form.where.selectedIndex==39)
                      destHREF="http://www.zdii.com/zdii_oia.asp";
if (form.where.selectedIndex==40)
                      destHREF="/cdj";
if (form.where.selectedIndex==41)
                      destHREF="/htt";
if (form.where.selectedIndex==42)
                      destHREF="/tma";
if (form.where.selectedIndex==43)
                      destHREF="/vjp";
if (form.where.selectedIndex==44)
                      destHREF="/ntp";
if (form.where.selectedIndex==45)
                      destHREF="/w9p";



if (destHREF) setTimeout("location = \'" + destHREF + "\'", 0);
                      }
                      // -- End of JavaScript code -------------- -->
                  </SCRIPT>
 <form>
        <SELECT NAME="where" size=1>
<OPTION SELECTED>Journal Sites
<OPTION VALUE="/asp">Active Server Developers Journal
<OPTION VALUE="/aov">Automating Office with VBA
<OPTION VALUE="/cpb">C++ Developers Journal
<OPTION VALUE="/cw7">Corel WordPerfect Suite
<OPTION VALUE="/ddj">Delphi Developers Journal
<OPTION VALUE="/eca">eCommerce Alert
<OPTION VALUE="/ewn">Explore the Net with Internet Explorer
<OPTION VALUE="/dbm">Exploring Oracle
<OPTION VALUE="ewn">Exploring Windows NT
<OPTION VALUE="/iac">Inside AutoCAD
<OPTION VALUE="/ial">Inside AutoCAD LT
<OPTION VALUE="/fmp">Inside FileMaker Pro
<OPTION VALUE="/fre">Inside Freehand
<OPTION VALUE="/iai">Inside Illustrator
<OPTION VALUE="/lss">Inside Lotus SmartSuite
<OPTION VALUE="/ima">Inside Microsoft Access
<OPTION VALUE="/ime">Inside Microsoft Excel
<OPTION VALUE="/mfp">Inside Microsoft FrontPage
<OPTION VALUE="/mo9">Inside Microsoft Office 95
<OPTION VALUE="/o97">Inside Microsoft Office 97
<OPTION VALUE="/imp">Inside Microsoft Project
<OPTION VALUE="/win">Inside Microsoft Windows
<OPTION VALUE="/w95">Inside Microsoft Windows 95
<OPTION VALUE="/w96">Inside Microsoft Windows 98
<OPTION VALUE="/msw">Inside Microsoft Word
<OPTION VALUE="/inw"> Inside NetWare
<OPTION VALUE="/ipm">Inside PageMaker
<OPTION VALUE="/ips">Inside Photoshop
<OPTION VALUE="/ipp">Inside PowerPoint
<OPTION VALUE="/qua">Inside Quark Xpress
<OPTION VALUE="/sun">Inside Solaris
<OPTION VALUE="/int">Inside the Internet
<OPTION VALUE="/ivb">Inside Visual Basic
<OPTION VALUE="/awd">Interactive Designer
<OPTION VALUE="/iba">Internet Business Advantage
<OPTION VALUE="/isa">Internet Search Advantage
<OPTION VALUE="/mac">Mac@Home
<OPTION VALUE="/mit">Microsoft Web Builder
<OPTION VALUE="http://www.zdii.com/zdii_oia.asp">OnLine Investing Advisor
<OPTION VALUE="/cdj">The CorelDraw Journal
<OPTION VALUE="/htt">The Hi-Tech Traveler
<OPTION VALUE="/tma">The MacAuthority
<OPTION VALUE="/vjp">Visual J++ Developers Journal
<OPTION VALUE="/ntp">Windows NT Professional
<OPTION VALUE="/ntp">Windows 95 Professional
 </SELECT>
 <input NAME=submit VALUE="Connect" TYPE=BUTTON
                      onClick=go(this.form)>
                      </FORM>


<table border="0" Cellpadding=0 cellspacing=0 width=470 height="15" align=center valign=top>
<tr>
      <td>
<center>
<a href="#top"><font face="arial, helvetica" size="1">Top of Page</font></a>

<font face="arial, helvetica" size="1">&nbsp;&#149;&nbsp;</font>

<a href="/ivb"><font face="arial, helvetica" size="1">IVB Home</font></a>

<font face="arial, helvetica" size="1">&nbsp;&#149;&nbsp;</font>

<a href="/ivb/backissu.htm"><font face="arial, helvetica" size="1">Back Issues</font></a>

<font face="arial, helvetica" size="1">&nbsp;&#149;&nbsp;</font>

<a href="/forms/ivb/cu2001.htm"><font face="arial, helvetica" size="1">Free Issue</font></a>

<font face="arial, helvetica" size="1">&nbsp;&#149;&nbsp;</font>

<a href="/ivb/code.htm"><font face="arial, helvetica" size="1">Source Code</font></a>



</center>
      </td>
</tr>
</table>
</center>
<p>

<FONT face="Arial, Helv" size="-2">
<CENTER>Copyright &copy; 1998, ZD Inc. All rights reserved. <A HREF="http://www.zdjournals.com/whoweare.htm" target="_top">ZD Journals</A> and the ZD Journals logo are trademarks of ZD Inc. Reproduction in whole or in part in any form or medium without express written permission of ZD Inc. is prohibited.
All other product names and logos are trademarks or registered trademarks of their respective owners.</CENTER><p>

<CENTER>
<A HREF="http://www.zdjournals.com/termcond.htm">Copyright Terms &amp; Conditions</A>
<P>
<A HREF="http://www.zdjournals.com/cobbcr.htm" target="_top">Questions? Comments?</A>
</FONT><BR>
</CENTER>

</CENTER>
</Td>
</TR>
</TABLE>
</BODY></HTML>


----  End  ----
ASKER CERTIFIED SOLUTION
Avatar of CraigLazar
CraigLazar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial