Link to home
Start Free TrialLog in
Avatar of VBdotnet2005
VBdotnet2005Flag for United States of America

asked on

VB6 to vb.net code - mappoint 2006

I need help coverting below code from vb6 to vb.net

[Microsoft Visual Basic 6.0]
  Sub FindAddressSearch()
  Dim objApp As New MapPoint.Application
  Dim objFindResults As MapPoint.FindResults
  'Set up application
  objApp.Visible = True
  objApp.UserControl = True
  'Output first result of find search
  Set objFindResults = objApp.ActiveMap.FindAddressResults("One Microsoft Way", "Redmond", , "WA", , geoCountryUnitedStates)
  MsgBox "The first item in the find list is: " _
    + objFindResults.Item(1).Name
  End Sub





  Sub ReturnPostalCode()

  Dim objApp As New MapPoint.Application
  Dim objMap As MapPoint.Map
  Dim strAddress As String
  Dim objSA As MapPoint.StreetAddress
     
  'Set up the application
  Set objMap = objApp.ActiveMap
  objApp.Visible = True
  objApp.UserControl = True

  'Set a string, then parse it
  strAddress = "1 Microsoft Way, Redmond, WA 98052"
  Set objSA = objMap.ParseStreetAddress(strAddress)

  'Return the postal code of the parsed address
  MsgBox "Postal code: " + CStr(objSA.PostalCode)

  End Sub
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial