#define INTERNET_CONNECTION_OFFLINE 0x20 function InternetConnected() local Flags store 0 to Flags return !empty(InternetGetConnectedState(@m.flags, 0)) ; and empty(bitand(m.Flags, INTERNET_CONNECTION_OFFLINE)) endfunc>Hi,
> >Declare SHORT InternetGetConnectedState In wininet ; > LONG @ lpdwFlags, Long Reserved > >lnFlags = 0 >Reserved = 0 > >If InternetGetConnectedState(@lnFlags, Reserved) =1 > &&& Internet access > > #Define FLAG_ICC_FORCE_CONNECTION 1 > > Declare Long InternetCheckConnection In Wininet.Dll String Url, Long dwFlags, Long Reserved > > * Fast and reliable web site > lcUrl = "http://www.google.com" > If InternetCheckConnection(lcUrl, FLAG_ICC_FORCE_CONNECTION, 0) <> 0 > m.internet = .T. > * ? "Connection is available" > Else > m.internet = .F. > *? "No Connection" > Endif >Else > m.internet = .F. >Endif > >>