Home General VB.NET Ping Server Connection .NET
20 | 05 | 2012
This site has been updated and renewed. You have followed an old link.

Click here to go to the new site

http://www.visiblevisual.com/jupgrade

Ping Server Connection .NET PDF Print E-mail
User Rating: / 1
PoorBest 
Tutorials

Use VB.NET to check a server connection. Try the Ping Function

[code]

    Function PingServer(ByVal Address As StringAs Boolean
        '*************************************
        '**** Code from VisibleVisual.com ****
        '*************************************
        If My.Computer.Network.Ping(Address, 1000) Then
            PingServer = True
        Else
            PingServer = False
        End If
    End Function

 
    Sub TestPingFunction()
        Dim rtrn As Boolean
        rtrn = PingServer("www.google.com")
 
        If rtrn = False Then
            MsgBox ("Ping request timed out.")
        ElseIf rtrn = True Then
            MsgBox ("Server pinged successfully.")
        End If
 
    End Sub

[/code]

 

Add comment


Security code
Refresh

This site has been updated and renewed. You have followed an old link.

Click here to go to the new site

http://www.visiblevisual.com/jupgrade