G
Guest
We do have a Ping class that follows the model from the desktop.
Something like this:
Private MyPinger As New OpenNETCF.Net.NetworkInformation.Ping
Private MyPingerReply As OpenNETCF.Net.NetworkInformation.PingReply
Try
Me.ListBox1.Items.Clear()
Me.Refresh()
Cursor.Current = Cursors.WaitCursor
MyPingerReply = MyPinger.Send("www.opennetcf.com")
Cursor.Current = Cursors.Default
Me.ListBox1.Items.Add("Status:" & MyPingerReply.Status.ToString)
Me.ListBox1.Items.Add("RoundTripTime:" &
MyPingerReply.RoundTripTime.ToString)
Me.ListBox1.Items.Add("Address:" &
MyPingerReply.Address.ToString)
Me.ListBox1.Items.Add("Options.DontFragment:" &
MyPingerReply.Options.DontFragment.TrueString)
Me.ListBox1.Items.Add("Options.Ttl:" &
MyPingerReply.Options.Ttl.ToString)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "App Exeption")
Cursor.Current = Cursors.Default
End Try
Something like this:
Private MyPinger As New OpenNETCF.Net.NetworkInformation.Ping
Private MyPingerReply As OpenNETCF.Net.NetworkInformation.PingReply
Try
Me.ListBox1.Items.Clear()
Me.Refresh()
Cursor.Current = Cursors.WaitCursor
MyPingerReply = MyPinger.Send("www.opennetcf.com")
Cursor.Current = Cursors.Default
Me.ListBox1.Items.Add("Status:" & MyPingerReply.Status.ToString)
Me.ListBox1.Items.Add("RoundTripTime:" &
MyPingerReply.RoundTripTime.ToString)
Me.ListBox1.Items.Add("Address:" &
MyPingerReply.Address.ToString)
Me.ListBox1.Items.Add("Options.DontFragment:" &
MyPingerReply.Options.DontFragment.TrueString)
Me.ListBox1.Items.Add("Options.Ttl:" &
MyPingerReply.Options.Ttl.ToString)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "App Exeption")
Cursor.Current = Cursors.Default
End Try