HelpContext |
Post Reply |
Author | |
joeliner
Senior Member Joined: 09 June 2006 Status: Offline Points: 273 |
Post Options
Thanks(0)
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 |
|
Mr.Den
Groupie Joined: 26 August 2007 Status: Offline Points: 50 |
Post Options
Thanks(0)
|
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 |
|
Mr.Den
Groupie Joined: 26 August 2007 Status: Offline Points: 50 |
Post Options
Thanks(0)
|
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 |
|
joeliner
Senior Member Joined: 09 June 2006 Status: Offline Points: 273 |
Post Options
Thanks(0)
|
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 |
|
Mr.Den
Groupie Joined: 26 August 2007 Status: Offline Points: 50 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |