Skip to content

Planet-Source-Code/rakesh-r-shetty-check-internet-connection__1-39332

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

check internet connection

Description

checks the internet connection

More Info

I have tested this code on windows 2000 and XP.

Dont know whether it works for windows 9x.

Submitted On
By Rakesh R. Shetty
Level Beginner
User Rating 5.0 (35 globes from 7 users)
Compatibility VB 5.0, VB 6.0
Category Internet/ HTML
World Visual Basic
Archive File

Source Code

Private Const FLAG_ICC_FORCE_CONNECTION = 1
Private Declare Function InternetCheckConnection Lib "wininet.dll" Alias "InternetCheckConnectionA" (ByVal lpszUrl As String, ByVal dwFlags As Long, ByVal dwReserved As Long) As Boolean
Private Sub Command1_Click()
Dim abc As String
 abc = InternetCheckConnection("http://www.microsoft.com", FLAG_ICC_FORCE_CONNECTION, 0)
 If abc = "True" Then
  MsgBox "Connected to the internet."
 Else
  MsgBox "Not connected to the internet."
 End If
End Sub

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published