PDA

Click to See Complete Forum and Search --> : Making a Help File


noname
Jul 6th, 2000, 02:57 AM
How do you make an help file & how would you access it within a program?

Thanks for Listening(reading)

Jul 6th, 2000, 08:25 AM
You can make it using the Help Workshop (Help Compiler) that is shipped with VB.

You call the Help file using a CommonDialog.


With CommonDialog1
'Specify the location of the Help file
.HelpFile = "C:\QLMCW\Qlmcw.hlp"
'Tell WinHelp to display the Help Contents
.HelpCommand = cdlHelpContents
'Display the topic
.ShowHelp
End With

Jul 6th, 2000, 08:46 AM
Here is the API method.

Code for a module.

Declare Function WinHelp Lib "user32.dll" Alias "WinHelpA" (ByVal hWndMain As Long, ByVal lpHelpFile As String, ByVal uCommand As Long, dwData As Any) As Long
Public Const HELP_CONTEXT = &H1
Public Const HELP_QUIT = &H2
Public Const HELP_INDEX = &H3
Public Const HELP_HELPONHELP = &H4
Public Const HELP_SETINDEX = &H5
Public Const HELP_KEY = &H101
Public Const HELP_MULTIKEY = &H201
Public Const HELP_CONTENTS = &H3&
Public Const HELP_COMMAND = &H102&
Public Const HELP_CONTEXTPOPUP = &H8&
Public Const HELP_FORCEFILE = &H9&
Public Const HELP_PARTIALKEY = &H105&
Public Const HELP_SETCONTENTS = &H5&
Public Const HELP_SETWINPOS = &H203&


This will display the Contents of the Help file you specifed

RetVal = WinHelp(Me.hWnd, "C:\MyHelpFile.hlp", HELP_CONTENTS, 0)