Community of VE/MapPoint Users and Developers
This is a discussion on Problem with ObjectsFromPoint within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I'm having trouble with the ObjectsFromPoint method. The following code throws an exception whenever there is a TextBox "under" ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Problem with ObjectsFromPoint I'm having trouble with the ObjectsFromPoint method. The following code throws an exception whenever there is a TextBox "under" the x, y. MapPoint.FindResult fr = axMappointCtrl.ActiveMap.ObjectsFromPoint(x,y) foreach(object o in fr) { Debug.Writeline("Doing nothing..."); } The method is fine as long as there is no textBox returned to the fr collection. When it is, the following exeption stack can be traced: at System.Runtime.InteropServices.Marshal.ThrowExcept ionForHR(Int32 errorCode, IntPtr errorInfo) at System.Runtime.InteropServices.Marshal.ThrowExcept ionForHR(Int32 errorCode) at System.Runtime.InteropServices.CustomMarshalers.En umeratorViewOfEnumVariant.GetNextElems() at System.Runtime.InteropServices.CustomMarshalers.En umeratorViewOfEnumVariant.MoveNext() Please, can anyone help me with this? //pobe |
| |||
|
Hi, What is the offending line of code ?
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi, I read this on a Microsoft page, guess this is what happens in my code. Quote:
/pobe |
| |||
|
Hi, Thanks for feedback. This is probably the reason.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| objectsfrompoint, problem |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I loose a lot of street names with ObjectsFromPoint(X,Y) | Anonymous | MapPoint 2006/2009 Discussion | 2 | 12-17-2004 11:06 AM |
| ObjectsFromPoint: no other solutions ? | Alexoff | MapPoint 2006/2009 Discussion | 0 | 02-05-2003 05:54 AM |