Jump to content

Recommended Posts

Posted (edited)
I believe there are some VB6 programmers in here so I thought I would toss this one out here. I am new to VB and I am working on a form that I would like to include a ping routing that would run in the background and ping the server and my cameras and give an indication of a good or bad connection with colors. I found some code for this but I think it is for .net and does not work in VB6. Dim ping As New cPing Dim IP As String = "192.168.1.50" ' Camera IP address Dim w As Short Dim Data As String If ping.ping(IP, w, Data) = True Then lblGS.BackColor = Color.Green Else lblGS.BackColor = Color.Red End If Any help is appreciated. Bob O. Edit....That looks ugly PingVB6.doc Edited by Bob O

Posted
I just happen to have a sample project that I had found a few months back that I used for a similar application. So here you go, if you have any questions let me know. It is probably a little more than you need, I know I stripped it down considerably for my application. Ping_From_VB.zip
Posted
Tech Junki, I found that same one this past weekend but you are correct that it seems to be more then I need and when I found that short bit of code that I post I became fixated on finding something nice and simple if possible. Any chance you could post your stripped down version if not I understand. Thanks, Bob O.
Posted
If you were using VB.NET it would be much simpler but unfortunately I think this is the best way I found in VB6. Just add the module in you program then forget it is there. The code to call the module is relatively simple from your main routine. Made a few quick mods to shorten and simplify from the main routine. Ping.zip

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...