suvmitra
asked on
Display "No Internet Connection"
Hi,
I am working in VB 6. I want to display a message in a textbox as "No Internet Connection" when the computer is not connected with internet or got disconnected.
The below code is only useful when your network cable is unplugged but I want something which will show Text7.text = 1 when and the moment I am logging off from my broadband / client.
Please help.
I am working in VB 6. I want to display a message in a textbox as "No Internet Connection" when the computer is not connected with internet or got disconnected.
The below code is only useful when your network cable is unplugged but I want something which will show Text7.text = 1 when and the moment I am logging off from my broadband / client.
Please help.
Private Declare Function InternetCheckConnection Lib "wininet.dll" Alias _
"InternetCheckConnectionA" (ByVal lpszUrl As String, ByVal dwFlags As Long, _
ByVal dwReserved As Long) As Long
Sub TestIt()
Text7.Text = InternetCheckConnection("http://www.google.com/", &H1, 0)
End Sub
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Nope, this one is also doing the same thing.
See what I want is, IF
WebBrowser1.Navigate (http://indiangeekforum.inf o/)
and this particular site displays itself into the webbrowser1..THEN
Timer1.Enabled = True
However, what is happening there is, I am logged out from my client but as I am using a LAN connection the internet connection is still there and it is showing me as connected.
So instead, what I want is if this particular website load itself into the webrowser1 then TEXTBOX1 should display as connected and the Timer Starts.
Please help.
See what I want is, IF
WebBrowser1.Navigate (http://indiangeekforum.inf
and this particular site displays itself into the webbrowser1..THEN
Timer1.Enabled = True
However, what is happening there is, I am logged out from my client but as I am using a LAN connection the internet connection is still there and it is showing me as connected.
So instead, what I want is if this particular website load itself into the webrowser1 then TEXTBOX1 should display as connected and the Timer Starts.
Please help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER