Sir how to make an application that only runs if my system or computer is connected to internet ?
Originally Posted by blackgaming
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]
Originally Posted by Hassan
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.
Originally Posted by Jason
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.