VB.NET
소스 If My.Computer.Network.IsAvailable Then
MsgBox("Computer is connected.")
Else
MsgBox("Computer is not connected.")
End If 

To check whether a computer has a working connection