ping an ip Address

  • Thread starter Thread starter Newbie
  • Start date Start date
N

Newbie

Is it possible, without any 3rd party tools to simply ping an ip address,
and get back if the ping was sucessfull.


Thanks
 
Newbie said:
Is it possible, without any 3rd party tools to simply ping an ip address,
and get back if the ping was sucessfull.


Thanks


Dim oPing As New Net.NetworkInformation.Ping
Dim myResponse As Net.NetworkInformation.PingReply
Dim myStatus As New clsStatus()

Try

myResponse = oPing.Send(txtComputername.Text, 8)
If myResponse.Status = NetworkInformation.IPStatus.Success
Then

Catch exPing As Net.NetworkInformation.PingException
'here the computer doesn't have a DHCP Lease anymore
MessageBox.Show("PC not online", "Ping", MessageBoxButtons.OK,
MessageBoxIcon.Information)

Catch ex As Sockets.SocketException
'here the computer is offline but still has a DHCP Lease
MessageBox.Show("PC not online", "Socket", MessageBoxButtons.OK,
MessageBoxIcon.Information)

End Try
 
Is it possible, without any 3rd party tools to simply ping an ip address,
and get back if the ping was sucessfull.

Thanks

Please open the object browser and search for "ping".

Alternate:

Please open google and search for "ping Visual Basic .NET"

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top