|
-
Jan 24th, 2007, 04:00 PM
#1
Thread Starter
Member
Ping Program
Hey guys, I haven't been on here in a while I have been busy with a bunch of things. Anywho, I would like to create a program that will ping a bunch of ip's with a single click and then if the IP is alive I would like my label to light up green if it's dead to light up red.

This is the code I have so far.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim MyPing As New System.Net.NetworkInformation.Ping
Dim MyPingResult As System.Net.NetworkInformation.PingReply = MyPing.Send("www.google.com")
If MyPingResult.Status = Net.NetworkInformation.IPStatus.Success Then
MessageBox.Show("Status: " & MyPingResult.Status.ToString)
Else
MessageBox.Show(MyPingResult.Status.ToString)
End If
End Sub
So basically when I run the program the way it is right now, it replies back "success", which is what is suppose to happen. What I would like to happen is.
When I click on the ping button each label would have an IP address associated with it and if it pings successfully I would like the
label(s), "Location 1" to light up green, if it fails I would like for it to light up red. And when you put the mouse over a label ("Location 1") I would like a window to pop up or fade in showing the IP address of that Location.
Any help, suggestion, comments, are appreciated.
Thanks for taking the time out to read my thread, hopefully this will help others.
Thanks again
ScarEye
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|