Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - HelpContext
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

HelpContext

 Post Reply Post Reply
Author
Message
joeliner View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 June 2006
Status: Offline
Points: 273
Post Options Post Options   Thanks (0) Thanks(0)   Quote joeliner Quote  Post ReplyReply Direct Link To This Post Topic: HelpContext
    Posted: 26 January 2010 at 4:11am
Hi guys

Am trying to access chm help file by specifying the helpcommand and helpcontext but no success

Anyone who has done it?

regards,


Product: Xtreme SuitePro (ActiveX) version 13.1
Platform: Windows XP SP 3
Language: Visual Basic 6 SP6
Back to Top
Mr.Den View Drop Down
Groupie
Groupie
Avatar

Joined: 26 August 2007
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mr.Den Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2010 at 12:31pm
Try:
 
Shell "rundll32.exe url.dll,FileProtocolHandler C:\WINDOWS\Help\access.chm", vbNormalFocus
 
change C:\WINDOWS\Help\access.chm to the path/filename you need.
 
A start to get the file up, I have code somewhere to specify but cannot look now, will check after lunch.
Product: Xtreme SuitePro (ActiveX) version 16.3.1

Platform: Windows 7 Professional (64bit) - SP 1

Language: Visual Basic 6.0 SP 6
Back to Top
Mr.Den View Drop Down
Groupie
Groupie
Avatar

Joined: 26 August 2007
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mr.Den Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2010 at 12:45pm

Found code faster than I thought I would

This code works with .hlp files, try it with the .chm files and see if it works. Not sure, but worth a shot.
 
'WINHELP DECLARATION
Public 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
 
Public Const HELP_CONTENTS = 3
Public Const HELP_FINDER = 11
 
'IN A MODULE
Public Sub ShowHelpContextID(ByVal intHelpFile As Integer, lngContextID As Long)
   
    ' Open the help file using the
    ' HELP_CONTEXT constant (1)
   
    WinHelp App.hInstance, SetHelpStrings(intHelpFile), 1, lngContextID
   
End Sub
 
Public Function SetHelpStrings(ByVal intSelHelpFile As Integer) As String
   
    ' Set the string variable to
    ' include the application path
   
    Select Case intSelHelpFile
       
        Case 1
            SetHelpStrings = App.Path & "\Res\Backup.hlp"
       
        Case 2
            ' Place other Help file paths in successive Case statements
            SetHelpStrings = App.Path & "\Res\Restore.hlp"
            
    End Select
 
End Function
 
Product: Xtreme SuitePro (ActiveX) version 16.3.1

Platform: Windows 7 Professional (64bit) - SP 1

Language: Visual Basic 6.0 SP 6
Back to Top
joeliner View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 June 2006
Status: Offline
Points: 273
Post Options Post Options   Thanks (0) Thanks(0)   Quote joeliner Quote  Post ReplyReply Direct Link To This Post Posted: 27 January 2010 at 10:07am
Hi Mr. Den,

Thanks for your input

@ first i had tried out the CJ way using this code. The help shows but i cannot show a specific page using the helpcontext command

      With CommonDialog
        .HelpFile = App.Path & "\somehelp.chm"
        .DialogStyle = 1
        .helpcommand = 1
        .HelpContext = 1001
        .Flags = 0
        .showhelp
      End With

For API I was using

Public 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

which works for for both chm and winhelp.

My main interest was on how i can navigate to a specific page on the help.

regards,
Product: Xtreme SuitePro (ActiveX) version 13.1
Platform: Windows XP SP 3
Language: Visual Basic 6 SP6
Back to Top
Mr.Den View Drop Down
Groupie
Groupie
Avatar

Joined: 26 August 2007
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mr.Den Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2010 at 12:12pm
Originally posted by joeliner joeliner wrote:

Hi Mr. Den,

Thanks for your input

@ first i had tried out the CJ way using this code. The help shows but i cannot show a specific page using the helpcontext command

      With CommonDialog
        .HelpFile = App.Path & "\somehelp.chm"
        .DialogStyle = 1
        .helpcommand = 1
        .HelpContext = 1001
        .Flags = 0
        .showhelp
      End With

For API I was using

Public 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

which works for for both chm and winhelp.

My main interest was on how i can navigate to a specific page on the help.

regards,
 
Using the code I gave you above:
 
Adding to the declarations:
   
    Public 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
 
I change this line:
WinHelp App.hInstance, SetHelpStrings(intHelpFile), 1, lngContextID
 
to:
HtmlHelp App.hInstance, SetHelpStrings(intHelpFile), 1, lngContextID
 
And the code works properly for .hlp files, have you tried that on a .chm file?
Product: Xtreme SuitePro (ActiveX) version 16.3.1

Platform: Windows 7 Professional (64bit) - SP 1

Language: Visual Basic 6.0 SP 6
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.