I am new to VB.NET and I want to implement a timer function into a PING, below is the code which I am using to PING an ip address. I want the PING to be executed something like every 10 seconds, so that it updates a lablel.
Any ideas how to do this?
Dim ping As New System.Net.Netw orkInformation. Ping
Dim options As New System.Net.Netw orkInformation. PingOptions
options.DontFra gment = True
Dim data As String = "aaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaa"
Dim buffer As Byte() = System.Text.Enc oding.ASCII.Get Bytes(data)
Dim pingreply As System.Net.Netw orkInformation. PingReply
Dim a() As Byte = {CInt(192), CInt(168), CInt(I0), CInt(5)}
Dim IP As New System.Net.IPAd dress(a)
pingreply = ping.Send(IP, 120, buffer, options)
If pingreply.Statu s.ToString = "TimedOut" Then
Any ideas how to do this?
Dim ping As New System.Net.Netw orkInformation. Ping
Dim options As New System.Net.Netw orkInformation. PingOptions
options.DontFra gment = True
Dim data As String = "aaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaa"
Dim buffer As Byte() = System.Text.Enc oding.ASCII.Get Bytes(data)
Dim pingreply As System.Net.Netw orkInformation. PingReply
Dim a() As Byte = {CInt(192), CInt(168), CInt(I0), CInt(5)}
Dim IP As New System.Net.IPAd dress(a)
pingreply = ping.Send(IP, 120, buffer, options)
If pingreply.Statu s.ToString = "TimedOut" Then
Comment