04-28-2010, 8:44 AM
|
Peter
Joined on 09-27-2007
Posts 171
|
Re: Visual Basic Template Wrong!
|
 
 
|
|
|
The template is right. The syntax of Enum in VB is the same as in VB.NET.
Here are some tips for using CHM in Visual Basic:
1. Connect to the .chm file by setting the App.HelpFile property:
App.HelpFile = App.Path & "\theHelpFile.chm"
2. To display a help topic when user presses F1
a. Set the form's WhatsThisHelp property to False.
b. Assign the TopicId (defined in the created .bas file) to the HelpContextID property of the form or controls on the form.
3. To display a help topic from within your Visual Basic code
a. Declare the function HtmlHelp like this:
Public Declare Function HTMLHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" (ByVal hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, dwData As Any) As Long
Public Const HH_DISPLAY_TOPIC = &H0
Public Const HH_HELP_CONTEXT = &HF
b. Call the function HtmlHelp to show the help topic:
HtmlHelp(frmTheFormName.hWnd, App.HelpFile, HH_HELP_CONTEXT, ByVal CLng(theTopicId))
|
|
|
|
|
Report
|
|
|
|