VB Code:
Private Declare Function InternetCheckConnection Lib "wininet.dll" Alias "InternetCheckConnectionA" (ByVal lpszUrl As String, ByVal dwFlags As Long, ByVal dwReserved As Long) As Long Private Const FLAG_ICC_FORCE_CONNECTION = &H1 Private Sub Form_Load() If InternetCheckConnection("http://www.galahtech.com", FLAG_ICC_FORCE_CONNECTION, 0&) = 0 Then MsgBox "No internet connection detected...", vbInformation Else MsgBox "Internet connection detected...", vbInformation End If End Sub




Reply With Quote