VBdotnet2005
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.FindAddre ssResults( "One Microsoft Way", "Redmond", , "WA", , geoCountryUnitedStates)
MsgBox "The first item in the find list is: " _
+ objFindResults.Item(1).Nam e
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
[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.FindAddre
MsgBox "The first item in the find list is: " _
+ objFindResults.Item(1).Nam
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(
'Return the postal code of the parsed address
MsgBox "Postal code: " + CStr(objSA.PostalCode)
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.