|
-
Oct 29th, 2002, 07:29 AM
#1
Thread Starter
New Member
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
-
Oct 29th, 2002, 07:35 AM
#2
Retired VBF Adm1nistrator
Well from what I can gather, I would say that Command1 opens the help file, and Command2 closes it...
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Oct 29th, 2002, 07:44 AM
#3
Fanatic Member
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.
Last edited by hothead; Oct 29th, 2002 at 07:48 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|