Hola, pues ando buscando como hacer esto, pues mi programa no tiene nnguna funcionalidad si no tiene internet el usuario, y me gustaria saber si hay alguna forma con algun codigo de saber si el usuario esta conectado a internet....
Por ejemplo si al ejecutar el programa..le aparezca un mensaje que le diga " No estas conectado a Internet" :rolleyes:
Gracias y Salu2! :)
Toma esto lo pones como esta
Public Function IsNetConnectOnline() As Boolean
IsNetConnectOnline = InternetGetConnectedState(0&, 0&)
End Function
y estas son las constantes y la API
Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef lpdwFlags As Long, ByVal dwReserved As Long) As Long
Public Const INTERNET_CONNECTION_MODEM_BUSY As Long = &H8
Public Const INTERNET_RAS_INSTALLED As Long = &H10
Public Const INTERNET_CONNECTION_OFFLINE As Long = &H20
Public Const INTERNET_CONNECTION_CONFIGURED As Long = &H40
Salu2
Sancho.Mazorka :P