View Single Post

  #3 (permalink)  
Old 09-04-2004
EdB EdB is offline
Member
Green Belt
 
Join Date: Aug 2002
Posts: 56
Eric,

I appreciate the response. I was able to get my situation to work by adding a windows form to my console app, adding a Mappoint control to that form, and just never showing the form.

But I wanted to to try your solution. Did someone just write that, or did they actually try it? Here's why I ask. When I copy and paste the solution as is, I get several compile errors. 6 with the project setting "Strict" on (which I normally use), and 3 with it off. Here are the errors.

1&2) Dim WithEvents oMpApp As MapPoint.Application
Dim WithEvents oMap As MapPoint.Map

Withevents variable does not raise any events

3,5&6) oMpApp = GetObject(, "MapPoint.Application")
myLoc = oMap.FindAddressResults(, , , states(I), , "USA")(1)
oMap.SaveAs(states(I), 2)


Option Strict On disallows implicit conversions from 'System.Object' to 'MapPoint.Application'

4) oMpApp = New MapPoint.Application()

'New' cannot be used on an interface.

I can get around the other 5......I don't know how to get around this one.


Ed
Reply With Quote