Código:
__________________________________________________ _
Function Verificar_conexion_a_internet()
'Nombre: Verificar conexión a internet
'Autor: Bloc
'Fecha Publicada: 13/08/2013
If My.Computer.Network.IsAvailable = True Then
Try
If My.Computer.Network.Ping("www.google.com", 10) Then
MsgBox("Si hay conexión a internet", MsgBoxStyle.Information)
End If
Catch ex As Exception
MsgBox("No hay conexión a internet", MsgBoxStyle.Critical)
End Try
End If
End Function
__________________________________________________ _
__________________________________________________ _
Function Verificar_conexion_a_internet()
'Nombre: Verificar conexión a internet
'Autor: Bloc
'Fecha Publicada: 13/08/2013
If My.Computer.Network.IsAvailable = True Then
Try
If My.Computer.Network.Ping("www.google.com", 10) Then
MsgBox("Si hay conexión a internet", MsgBoxStyle.Information)
End If
Catch ex As Exception
MsgBox("No hay conexión a internet", MsgBoxStyle.Critical)
End Try
End If
End Function
__________________________________________________ _