Hi All's,

I'm currently doing my project to check my server status with ping option. but i got problem to check either the network is plugged or unplugged...I need this checking automaticly using timer...here what i have done....to ping the server is success but when pulgged back the network...error come around..pls help me...

Private Sub Timer4_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer4.Tick
        Timer4.Interval = 30000
        If My.Computer.Network.IsAvailable Then
            If My.Computer.Network.Ping("www.mine.my", 500) Then
             End If


        End If

    End Sub

Try This :

Function HasConnectivity() As Boolean
    Dim hostInfo As System.Net.IPHostEntry
    Try 'to look for the logon server
        Dim sServer As String = Environment.GetEnvironmentVariable("logonserver")
        hostInfo = System.Net.Dns.GetHostByName(sServer.Remove(0, 2))
        Return True
    Catch 'theres no network connection
        Return False
    End Try
End Function

For Checking :

If HasConnectivity() = True Then
   ' Your Ping Code
   MsgBox("not connected")
End If

thank you...i'm will try it....