-
what does this mean?
I am tring to open a help file from oracle project ,so I search the web and found this code about opening a help file called "HHDemo.chm" from a vb project and I dont under stand the code.
could you please help me?
this is the code
(
Private Declare Function HtmlHelp Lib "HHCtrl.ocx" Alias "HtmlHelpA" _
(ByVal hWndCaller As Long, _
ByVal pszFile As String, _
ByVal uCommand As Long, _
dwData As Any) As Long
Const HH_DISPLAY_TOPIC As Long = 0
Const HH_HELP_CONTEXT As Long = &HF
Private Sub Form_Load()
ChDir App.Path
End Sub
Private Sub Command1_Click()
HtmlHelp hWnd, "HHDemo.chm", HH_HELP_CONTEXT, ByVal 101&
End Sub
Private Sub Command2_Click()
HtmlHelp hWnd, "HHDemo.chm", HH_HELP_CONTEXT, ByVal 100&
End Sub
)
thanx
Reema
-
Well from what I can gather, I would say that Command1 opens the help file, and Command2 closes it...
-
I commented the code so you can understand what's going on here.
Code:
Private Declare Function HtmlHelp Lib "HHCtrl.ocx" Alias "HtmlHelpA" _
(ByVal hWndCaller As Long, _
ByVal pszFile As String, _ 'I think this checks the file size, I'm not sure
ByVal uCommand As Long, _
dwData As Any) As Long
Const HH_DISPLAY_TOPIC As Long = 0 'Displays the topic clicked on
Const HH_HELP_CONTEXT As Long = &HF 'I think this tells VB you want context-sensitive help
Private Sub Form_Load()
ChDir App.Path 'Changes directory to where the application is stored
End Sub
Private Sub Command1_Click()
HtmlHelp hWnd, "HHDemo.chm", HH_HELP_CONTEXT, ByVal 101& 'Opens HHDemo.chm as a context-sensitive help file, if my above translation of the variable is correct.
End Sub
Private Sub Command2_Click()
HtmlHelp hWnd, "HHDemo.chm", HH_HELP_CONTEXT, ByVal 100& 'This closes the help file.
End Sub
I might be wrong though. I'm not too familiar with help file making.