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.