I want to know the extent of the displayed map, so I have a MapPoint control on a VB6 form and it's width and height are 900 x 900. I want to get the top left and bottom right coordinates - using of course using Gilles' CalcPos.
So I do :-
Dim X As Double
Dim Y As Double
X = 0
Y = 0
Set objLoc = MP.ActiveMap.XYToLocation(X, Y)
All OK...
X = MP.Width-1
Y = MP.Height-1
Set objLoc = MP.ActiveMap.XYToLocation(X, Y)
And our old friend -2147024809 The parameter is incorrect makes an appearance!
It will only work if you subtract 6 from Height and Width, and if you do a MouseMove and look at the X and Y the range is 0 to 893.
Any ideas why?
Andy.