Tutorial #3 - Check For Internet Connection
1. Open Visual Basic, name your project whatever.
2. Add: Label, Button.
[img]http://speedcap.net/img/fac064aefa9a848d534f05f35d0e1e20/4f4de67b.png[/img]
3. Double Click The Button
4. Write:
Debug, click the button and you should get:
[img]http://speedcap.net/img/fac064aefa9a848d534f05f35d0e1e20/200285cd.png[/img]
1. Open Visual Basic, name your project whatever.
2. Add: Label, Button.
[img]http://speedcap.net/img/fac064aefa9a848d534f05f35d0e1e20/4f4de67b.png[/img]
3. Double Click The Button
4. Write:
Code
Dim WebClient As New Net.WebClient 'Declare The WebClient
Label1.Text = WebClient.DownloadString("http://www.pastn.com/index.php") 'Download the ip string from my site.
If Label1.Text = "" Then
MsgBox("No Internet Connection!", MsgBoxStyle.Information) 'Error if no connection
Else
MsgBox("Internet Connection Available!", MsgBoxStyle.Information) 'Success if connection!
End IfDebug, click the button and you should get:
[img]http://speedcap.net/img/fac064aefa9a848d534f05f35d0e1e20/200285cd.png[/img]



![[Image: bmb5MjV.png]](https://i.imgur.com/bmb5MjV.png)