Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating Help File for use in VB Projects

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello Everybody. I want to create a help file for my project. I have completed all the documentation required (in MS-WORD)for my project and saved the file with the extension name .hlp. But vb is giving some error.

Please suggest what exactly I have to do.
 
what you need to do it create a document in rich text format
(using word if you prefer)
compiling it with the microsoft help file compiler
(free from thier website)
call it with an api call

basically the code after you have created and compiled is
declarations
Private Declare Function WinHelp Lib "user32" Alias "WinHelpA" _
(ByVal hWnd As Long, ByVal lpHelpFile As String, _
ByVal wCommand As Long, ByVal dwData As Long) As Long

Private Const HELP_CONTENTS = 3
Private Const HELP_FINDER = 11


Public Sub helpfile()
Dim lResult As Long
Dim sHelpFile As String
Dim lCommand As Long, lOption As Long


sHelpFile = "[your help files name]"
lCommand = HELP_CONTENTS
lOption = 0
lResult = WinHelp(frmMain.hWnd, sHelpFile, lCommand, lOption)
End Sub

 

I agree with JohnYingling, the HTMLHelp is nicer.
If you want to use the old help compiler you do not need to use an API function to open the help project, you can also use the CommonDialog.

Good luck,
Sunaj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top