Check if the Computer is Connected to a Network using VB.NET 2005 and Higher

Click Star to Rate Post
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
 

How to check if a computer is connected to a network or not.

‘Check if the computer is connected to the network. 
MsgBox(My.Computer.Network.IsAvailable)

One thought on “Check if the Computer is Connected to a Network using VB.NET 2005 and Higher

  1. Arun

    Dim networkAvailable As Boolean

    networkAvailable = My.Computer.Network.IsAvailable

    If networkAvailable = True Then

    MsgBox(“The network is available”)

    ElseIf networkAvailable = False Then

    MsgBox(“The network is unavailable”)

    End If

    Reply

Leave a Reply

Your email address will not be published.