Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have seen many examples of ping monitors with a backside t-sql database to store ip addresses. If I have the exact fqdn or IP addresses that I would like to monitor with a ping loop or a timed ping loop. How would I write the vb in order to use a green light red light method to indicate that each server was either connected or disconnected.

Sincerely,

Chris

For Example,
on the form it would look like this

(Server Connection Status)

Server Name = Green/Red
Server Name = Green/Red
Server Name = Green/Red

This would load and start automatically when the program is opened, and would cycle under its own thread so not to slow or make the application freeze during the ping loop lets say every 60 seconds per each server / ip.
Posted
Comments
[no name] 4-Jan-15 12:28pm    
Examples are very welcome and highly encouraged.

Thanks -Chris
[no name] 4-Jan-15 12:58pm    
Imports System.Net
Imports System.Net.Sockets
Public Class Form3
Dim logonServer As New TcpClient()
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
MessageBox.Show("The Launcher is Loading all the informasion it need! it may take up to 1 min")
Timer1.Start()
Try
logonServer.Connect("77.75.123.215", 9988)

Catch generatedExceptionName As Exception
Me.pict_logonServer.BackColor = Color.Red

End Try
If logonServer.Connected Then


Me.pict_logonServer.BackColor = Color.Green
logonServer.Close()
End If
[no name] 4-Jan-15 12:59pm    
I keep getting an reference to non-shared member requires an object reference on timer1.start() any help would be great

1 solution

 
Share this answer
 
Comments
[no name] 4-Jan-15 12:27pm    
How would I create the Green or Red indicators using the successful replies? If you could provide an example that would be awesome.
Mehdi Gholam 4-Jan-15 13:31pm    
The simplest is a label which you change the ForeColor of.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900