Solved

HTML-Help and Visual Basic

Posted on 1998-06-12
2
217 Views
Last Modified: 2013-11-25
Where can I get some information on how to integrate HTML-Help into my VB5 Application.  If you have some information please send provide it here, also does it work the same way the WINHelp works.  does the F1 Key call HTML-Help instead, I am confused.  The documentation with the Microsoft HTML Help Workshop does not specify how to integrate it into your program.

Thanks.
0
Comment
Question by:Steve Groner
2 Comments
 
LVL 4

Accepted Solution

by:
yowkee earned 50 total points
ID: 1463214
sgroner,

  You could getting some info from following site:
http://www.microsoft.com/workshop/author/htmlhelp/default.asp
http://www.helpmaster.com/htmlhelp/htmlhelp.htm

  After you have download MS Html Help workshop, create a .hhp project, follow the step to create your help file, and finally compile to a .chm file(a compressed file of html files).

  For calling the html help file from your VB application. You must use API "HtmlHelpA" to call the html help file. There is a file hhctrl.ocx stay in your windows system directory after you install MS html help workshop, and it contains the required API to call html help file.

-----
For example:
' Your html help project create a file "test.chm"

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
 
Private Sub Command1_Click()
    Call HtmlHelp(Me.hWnd, "test.chm" + vbNullChar, 0, 0)
End Sub
-----

The pszFile parameter required a string which terminated with null, that's why I put "test.chm" + vbNullChar.

You could also implement context help which is similiar to windows help file. What you need is passing different value to 3rd parameter(uCommand) of HtmlHelp API. You could find the info you need in the help of MS html help workshop. It is under category HTML Help Reference--> Htmlhelp API Reference. For getting all the value of the constants you find in the help, look for a file HtmlHelp.h which under directory "xxx\HTML Help Workshop\include\".

I list out some of the constants here:
---
Const HH_DISPLAY_TOPIC = 0
Const HH_HELP_FINDER = 0             ' WinHelp equivalent
Const HH_DISPLAY_TOC = 1             ' not currently implemented
Const HH_DISPLAY_INDEX = 2           ' not currently implemented
Const HH_DISPLAY_SEARCH = 3          ' not currently implemented
Const HH_SET_WIN_TYPE = 4
Const HH_GET_WIN_TYPE = 5
Const HH_GET_WIN_HANDLE = 6
Const HH_ENUM_INFO_TYPE = 7          ' Get Info type name, call repeatedly to enumerate, -1 at end
Const HH_SET_INFO_TYPE = 8           ' Add Info type to filter.
Const HH_SYNC = 9
Const HH_ADD_NAV_UI = &HA              ' not currently implemented
Const HH_ADD_BUTTON = &HB              ' not currently implemented
Const HH_GETBROWSER_APP = &HC          ' not currently implemented
Const HH_KEYWORD_LOOKUP = &HD
Const HH_DISPLAY_TEXT_POPUP = &HE      ' display string resource id or text in a popup window
Const HH_HELP_CONTEXT = &HF            ' display mapped numeric value in dwData
Const HH_TP_HELP_CONTEXTMENU = &H10    ' text popup help, same as WinHelp HELP_CONTEXTMENU
Const HH_TP_HELP_WM_HELP = &H11        ' text popup help, same as WinHelp HELP_WM_HELP
Const HH_CLOSE_ALL = &H12              ' close all windows opened directly or indirectly by the caller
Const HH_ALINK_LOOKUP = &H13           ' ALink version of HH_KEYWORD_LOOKUP
Const HH_GET_LAST_ERROR = &H14         ' not currently implemented ' See HHERROR.h
Const HH_ENUM_CATEGORY = &H15          ' Get category name, call repeatedly to enumerate, -1 at end
Const HH_ENUM_CATEGORY_IT = &H16       ' Get category info type members, call repeatedly to enumerate, -1 at end
Const HH_RESET_IT_FILTER = &H17        ' Clear the info type filter of all info types.
Const HH_SET_INCLUSIVE_FILTER = &H18   ' set inclusive filtering method for untyped topics to be included in display
Const HH_SET_EXCLUSIVE_FILTER = &H19   ' set exclusive filtering method for untyped topics to be excluded from display
Const HH_SET_GUID = &H1A               ' For Microsoft Installer -- dwData is a pointer to the GUID string

------

Regards.
0
 
LVL 1

Author Comment

by:Steve Groner
ID: 1463215
Thanks alot.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem to file 3 74
using Access 8 68
Macro Excel - Multiple If conditions 2 72
How do ASP.NET and MVC work together? 4 47
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question