| Re: VB.net Calcpos
Your longitude and latitude ordinates are defined as "byval". You must use ByRef. I assume that is what it is called in VB.Net - it is in VB6 (C# uses 'ref' and 'out').
byval is one way - data is passed into the function, but nothing is passed back.
It is also good practice to use 'byref' for object parameters (eg. the location and map objects).
This removes unnecessary copying/etc. (I'm not sure if I would trust a MapPoint.Map object that has been deep-copied)
Richard |