❓ [HELP] Check if internet is available[Solved]

Posts 1–7 of 7 · Page 1 of 1
❓ [HELP] Check if internet is available[Solved]
Sir how to make an application that only runs if my system or computer is connected to internet ?
Quote Originally Posted by blackgaming View Post
Sir how to make an application that only runs if my system or computer is connected to internet ?
Put the following on the main form's load event (usually Form1_load):
[php]
If Not My.Computer.Network.IsAvailable Then
Msgbox("****** ! Connect to internet and run application again.")
End
End If[/php]
Quote Originally Posted by Hassan View Post


Put the following on the main form's load event (usually Form1_load):
[php]
If My.Computer.Network.IsAvailable Then
Msgbox("****** ! Connect to internet and run application again.")
End
End If[/php]
Better then my guess...Google xD
on the formloading event

[php]
If Not My.Computer.Network.Ping("www.google.com") OrElse Not My.Computer.Network.Ping("www.facebook.com") Then Application.Exit
[/php]

Ping the two websites that are supposed to have 100% uptime. If either of these responds the person has an internet connection.

EDIT: Hassan you're wrong lol, for 2 reasons. 1, you said if the network "ISAVAILABLE" then End. And also, you can have a network connection and no internet connection.
Quote Originally Posted by Jason View Post

EDIT: Hassan you're wrong lol, for 2 reasons. 1, you said if the network "ISAVAILABLE" then End. And also, you can have a network connection and no internet connection.
Literally forgot to add Not !!
Thanks .. Please Mark my post as solved !
Damm this thread helped me 2..Thanks guys..
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.
Talk with us