Hi all,
I did some research and found the following solution that works great. For the whole time, I was stuck in thinking that it's the problem with the MS Common Dialog Control. Well, the answer is that if you want to launch an HTML ".chm" Help file from VB6, you would not use MS Common Dialog Control at all.
VB provides an API function called "HTMLHelp". To gain access to this function, you will need to provide the following declaration:
Private 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
To use it, try the following:
HtmlHelp hWnd, "HHDemo.chm", HH_HELP_CONTEXT, ByVal 100&
where the constants are defined as follows:
Const HH_DISPLAY_TOPIC As Long = 0
Const HH_HELP_CONTEXT As Long = &HF
Const HH_DISPLAY_TOC = &H1
For more information, you can reference Microsoft knowledge base Article 315988 thru the following link:
http://support.microsoft.com/kb/315988/en-us
Thanks to everyone for reading my post.
Have a nice day,
Khoi.
Khoi Nguyen