borderAndreaVB free resources for Visual Basic developersborder

AndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincani
:: How to implement chm Help to Visual Basic Applications

Author  

Arthur

Language  

VB5, VB6

Operating Systems  

Windows 98, NT, 2000, Me, XP
API Declarations
'First place a existing chm File in the project path.
'You must know what name your htm pages have to work
'correct.

'In a module place the follwing code
Option Explicit
Private Declare Function HtmlHelpTopic Lib "hhctrl.ocx" Alias _
    "HtmlHelpA" (ByVal hWnd As Long, ByVal lpHelpFile As String, _
    ByVal wCommand As Long, ByVal dwData As String) As Long
Module

Sub ShowHtmlHelp(ByVal tHelpFile As String, ByVal tHelpPage As String)
    Const HH_DISPLAY_TOPIC =3D &H0
    On Error Resume Next
   
' open the help page in a modeless window
    HtmlHelpTopic 0, tHelpFile, HH_DISPLAY_TOPIC, tHelpPage
End Sub

Usage

'Put a command  button to your form and name it cmdHelp
Private Sub cmdHelp_Click()
   
'This is only a example
    ShowHtmlHelp App.path & "\MyHelp.chm", "Introduction.htm"
End Sub

:: Navigation

Home

Miscellaneous API Tips

Previous Tip

Next Tip

:: Search this site
Google
:: Related Topics
icon 14-11-2007 Getting Compile Error using Database Object in VBA by BlackDuck603
icon 20-02-2005 Re: Very Important problem in OCX & Resource (plzzzzzzzzzzzzzzzzzzzzz) by ~Bean~
icon 15-09-2004 Re: Crystal Report & VB by amitsaxena
icon 24-06-2004 Re: Form Show? by fabulous
icon 08-04-2004 Re: ActiveX "Mark as Safe" by MikeG
Partners: Il portale per lui e lei | Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder