Project's help file 
Author Message
 Project's help file

Hi,
    i have this .chm help file that is the project's help and i have a
command button that i want to show that help file when you click on it. How
do you open that .chm file? Thanks!


Mon, 14 Jan 2002 03:00:00 GMT  
 Project's help file
Hi,

There are several ways to do this. One is to use :

Shell "Start c:\progra~1\MyProg\MyProg.chm"

Note that the path and file name have to be in 8.3 format.

--

Regards, Paul.


www.gooch.co.uk


Quote:
> Hi,
>     i have this .chm help file that is the project's help and i have a
> command button that i want to show that help file when you click on it.
How
> do you open that .chm file? Thanks!



Mon, 14 Jan 2002 03:00:00 GMT  
 Project's help file
This works great for me....

' Help contstants
Public Const HH_DISPLAY_TOC = &H1
Public Const HH_DISPLAY_INDEX = &H2

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

Public Sub ShowHelp(ByVal iWindow As Integer)

    Dim lResult As Long

    On Error GoTo ShowHelpError

    ' This call assumes that a pointer to your help file is located in
App.HelpFile and you have a form
    ' called frmMain which acts as the parent to the new help window.
Change for form name to
    ' whatever you need...
    lResult = HtmlHelp(frmMain.hWnd, App.HelpFile, iWindow, 0)

    Exit Sub

ShowHelpError:

    Exit Sub

End Sub

Then call it like this....

ShowHelp HH_DISPLAY_TOC                 ' displays the table of contents
ShowHelp HH_DISPLAY_INDEX             ' displays the index

 - Paul

Quote:

>Hi,
>    i have this .chm help file that is the project's help and i have a
>command button that i want to show that help file when you click on it. How
>do you open that .chm file? Thanks!



Mon, 14 Jan 2002 03:00:00 GMT  
 Project's help file
I just uploaded a VB class file for HTML Help to my web page at
http://www.vbexplorer.com/htmlhelp.asp.  With 14 methods, 29 properties, and
2 routines in a separate module, it wraps almost 100% of the HTML Help API
for VB use.  Just drop it into your project and use it.  Calling a topic in
a CHM from a command button becomes:

Private hHelp As New HTMLHelp

Private Sub cmdHelp_Click()

  With hHelp
    .CHMFile = App.Path & "\myhelp.chm"
    .HHTopicID = 1030
    .HHWindow = "Main"
    .HHDisplayTopicID
  End With

End Sub

Alternately, you can display it via its URL:

Private hHelp As New HTMLHelp

Private Sub cmdHelp_Click()

  With hHelp
    .CHMFile = App.Path & "\myhelp.chm"
    .HHTopicURL = "html\introduction.htm"
    .HHWindow = "Main"
    .HHDisplayTopicURL
  End With

End Sub

David
Microsoft HTML Help MVP

**David's HTMLHelp Center is at:
http://www.vbexplorer.com/htmlhelp.asp


Quote:
> Hi,
>     i have this .chm help file that is the project's help and i have a
> command button that i want to show that help file when you click on it.
How
> do you open that .chm file? Thanks!



Mon, 14 Jan 2002 03:00:00 GMT  
 Project's help file
Shell "hh <help filename>", vbNormalFocus

...or even better:

Private Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal
lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String,
ByVal nShowCmd As Long) As Long

Private Sub Command1_Click()
    ShellExecute 0, "open", "<help filename>", "", "", vbNormalFocus
End Sub

(the second example opens the helpfile with whatever program it's
associated)



Quote:
> Hi,
>     i have this .chm help file that is the project's help and i have a
> command button that i want to show that help file when you click on it.
How
> do you open that .chm file? Thanks!



Mon, 28 Jan 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Help: Moving project files between PC's?

2. Can't get help file working on project

3. Project file...contains invalid key 'Retained'

4. Project file...contains invalid key 'Retained'

5. Newbie: VB6 DSW Project file Won't Open Under DOTNET VStudio

6. can't file project or library query

7. why doesn't anyone post their PROJECT files

8. Multip Projects, can't run 2nd project

9. Missing File??? Won't Save Project

10. VBA reference in project is bad - can't find project or library

11. HELP - Can't open excel document from project 2000

12. HELP: Can't open new project

 

 
Powered by phpBB® Forum Software