To test that code, Open a new VB project, just add a form with a text box.\
'===========
Option Explicit
Private Declare Function InternetGetConnectedState _
Lib "wininet.dll" (ByRef lpdwFlags As Long, ByVal dwReserved As Long) As
Long
Public Function IsNetConnectOnline() As Boolean
IsNetConnectOnline = InternetGetConnectedState(0&, 0&)
End Function '####END MODULE
Private Sub Command1_Click()
Text1 = IsNetConnectOnline()
End Sub 'returns True orfalse, simple :)
Seb.
Quote:
> How can I detect when de computer connects or disconnects from
internet?
> Thanks.