I have a problem when trying to detect the computers network connection status. Here is the code I have used:
Dim IsAvalible As String = My.Computer.Network.IsAvailable
If IsAvalible = True Then
Label1.Text = "Connected"
Else
If IsAvalible = False Then I
Label1.Text = "Disconnected"
End If
End If
But for some even when the network is disconnected or the computers wifi is turned on I still get the result of "Connected". I think there something wrong with the code. Could someone help me please ? Thank You