I am trying to use ActiveX with Mappoint. I found the following code in this forum
FUNCTION MapPointTest()
local hToolBar, hStandard, oMapPoint, nDist
oActiveX = TActiveX():New( oWnd, "MapPoint.Control.16" )
oWnd:oClient = oActiveX // To fill the entire window surface
oActiveX:Do( "Newmap", 1 )
hToolBar = oActiveX:;GetProp( "Toolbars" )
hStandard = OleGetProperty( hToolBar, "Item", "Standard" )
OleSetProperty( hStandard, "Visible", .T. )
oActiveX:GetProp( "Toolbars" )
// The following code generate error
oActiveX:Distance('205 Broadway, Lawrence, MA', '77 Centre Street, Boston, MA' )[/code]
Error description: Error BASE/1004 Message not found: TACTIVEX:DISTANCE
From Mappoint Method help (Microsoft Developer Network)
- Code: Select all Expand view
- Applies to
Objects: Map
Syntax
object.Distance(StartLocation, EndLocation)
Parameters
Part Description
object Required. An expression that returns a Map object.
StartLocation Required Location object. The start point of the distance to be measured.
EndLocation Required Location object. The end point of the distance to be measured.
Any clue why ActiveX does not recognize the Distance method?
Regards,
George