I have never used this but this looks like what you need. The documentation says if no GPS is available it will use Wi-Fi triangulation. I don't know if it would do the same for a wired connection. Without a GPS, it will not be as accurate as a GPS. Without a GPS, it is probably using the location of your ISP. Try it and let us know how it works.
See
System.Device.Location Namespace[
^] and
GeoCoordinateWatcher Class[
^].
I got this to work on Windows 8 Wi-Fi and wired connection. It is possible that the wired connection test used remembered coordinates from the Wi-Fi test.
Add a Reference to: System.Device
Imports System.Device.Location
Private WithEvents watcher As GeoCoordinateWatcher
Public Sub GetLocationDataEvent()
watcher = New System.Device.Location.GeoCoordinateWatcher()
AddHandler watcher.PositionChanged, AddressOf watcher_PositionChanged
watcher.Start()
End Sub
Private Sub watcher_PositionChanged(ByVal sender As Object, ByVal e As GeoPositionChangedEventArgs(Of GeoCoordinate))
MsgBox(e.Position.Location.Latitude.ToString & ", " & _
e.Position.Location.Longitude.ToString)
watcher.Stop()
End Sub