Article ID: 191174
Article Last Modified on 6/29/2004
oMyHyperLink = NewObject("Hyperlink")
cHelpPath = substr(Home(5), 1, Len(Home(5))-8)
cVFPHelpTopicPath = "mk:@MSITStore:" + cHelpPath + ;
"FOXHELP.CHM::/html/vfpstartpage.htm"
oMyHyperLink.NavigateTo(cVFPHelpTopicPath)
The following sample code creates a form that contains the Microsoft
WebBrowser control, and it automatically navigates to the Visual FoxPro
help topic when it is launched. This form does not provide any navigation
capabilities outside of those offered within the help topic. However, using
the WebBrowser control's extensive object model, it is possible to provide
this functionality.
PUBLIC oMyHelpViewer
oMyHelpViewer = NewObject("myhtmlhelpviewer")
oMyHelpViewer.Show
DEFINE CLASS myhtmlhelpviewer AS form
Top = 0
Left = 0
Height = 454
Width = 633
DoCreate = .T.
BorderStyle = 2
Caption = "Custom HTML Help Viewer"
MaxButton = .F.
WindowState = 0
Name = "Form1"
ADD OBJECT olecontrol1 AS olecontrol WITH ;
Top = 10, ;
Left = 16, ;
Height = 433, ;
Width = 601, ;
Name = "Olecontrol1", ;
OLEClass = "Shell.Explorer.2"
PROCEDURE olecontrol1.Refresh
NODEFAULT
ENDPROC
PROCEDURE olecontrol1.Init
cHelpPath = SubSTR(Home(5), 1, Len(Home(5))-8)
cVFPHelpTopicPath = "mk:@MSITStore:" + cHelpPath + ;
"FOXHELP.CHM::/html/vfpstartpage.htm"
This.Navigate(cVFPHelpTopicPath)
ENDPROC
ENDDEFINE
It is important to recognize that although this HTML help viewer allows you
to view HTML help topics, it will not provide all of the features and
functionality that the Microsoft HTML Help Viewer provides, and there are
certain HTML help features that will not work at all when viewing help
topics using the WebBrowser control.
Keywords: kbhowto kbcode KB191174