VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Check for a connection to the internet using the InternetCheckConnection API call.

by Daniel S Boucher (4 Submissions)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 5th October 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Check for a connection to the internet using the InternetCheckConnection API call.

API Declarations


Private Declare Function InternetCheckConnection Lib "wininet.dll" Alias "InternetCheckConnectionA" (ByVal lpszUrl As String, ByVal dwFlags As Long, ByVal dwReserved As Long) As Long


Rate Check for a connection to the internet using the InternetCheckConnection API call.



Private Sub Form_Load()
    If InternetCheckConnection("http://www.microsoft.com", FLAG_ICC_FORCE_CONNECTION, 0&) = 0 Then
        MsgBox "No internet connection detected...", vbInformation
    Else
        MsgBox "Internet connection detected!!", vbInformation
    End If
End Sub

Download this snippet    Add to My Saved Code

Check for a connection to the internet using the InternetCheckConnection API call. Comments

No comments have been posted about Check for a connection to the internet using the InternetCheckConnection API call.. Why not be the first to post a comment about Check for a connection to the internet using the InternetCheckConnection API call..

Post your comment

Subject:
Message:
0/1000 characters