Well here we are, I present you iPing!
This program allows you to ping any host, (www.***.com or an IP) and tells you the response in "MS".
Opinions would be nice, any problems let me know.
Here is the Source code for any suspicious people:
I Have attached the Setup in a Zip file for you all.
This program allows you to ping any host, (www.***.com or an IP) and tells you the response in "MS".
Opinions would be nice, any problems let me know.
Here is the Source code for any suspicious people:
Code:
Option Strict Off
COPYRIGHT HARRIE PATEMAN © 2014-2016
Imports System.Net
Public Class Form1
Dim IPAddress As String
Public Property CheckingPing As Boolean = False
#Region "Ping Function"
Private Function DoPing(ByVal Address As String) As Long
Dim p As New NetworkInformation.Ping
Dim r As NetworkInformation.PingReply
Try
r = p.Send(Address)
Return r.RoundtripTime
Catch ex As Exception
Return -1
End Try
End Function
#End Region
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
If CheckingPing = False Then
If Not TextBox1.Text = String.Empty Then
Timer1.Start()
Timer1.Enabled = True
CheckingPing = True
Button1.Text = "Stop"
TextBox1.Enabled = False
Else
MessageBox.Show("Please Enter a Host!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
Else
Timer1.Stop()
Timer1.Enabled = False
CheckingPing = False
Button1.Text = "Start"
TextBox1.Enabled = True
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer1.Tick
Dim ms As Long = DoPing(TextBox1.Text)
If ms >= 0 Then
TextBox2.Text = "Ping: " & ms.ToString & "ms" & " - Online!"
Else
TextBox2.Text = "Cant connect to """ & TextBox1.Text & """"
Timer1.Stop()
Timer1.Enabled = False
TextBox1.Enabled = True
CheckingPing = False
Button1.Text = "Start"
End If
End Sub
Private Sub Form1_Shown(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Shown
TextBox1.Focus()
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub GroupBox2_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox2.Enter
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Close()
End Sub
Private Sub ToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
AboutBox1.ShowDialog()
End Sub
Private Sub HelpToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HelpToolStripMenuItem.Click
AboutBox1.ShowDialog()
End Sub
Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
AboutBox1.ShowDialog()
End Sub
End Class
Attachments
My Computer
- Computer type
- PC/Desktop
- Computer Manufacturer/Model Number
- Custom Build
- OS
- Windows 7 Ultimate 64-bit
- CPU
- Intel G3420 3.2GHZ Dual Core
- Motherboard
- Gigabyte H87-HD3
- Memory
- Kingson 8GB 1600mhz
- Graphics Card(s)
- MSI R7970 TF 3GD5/OC BE
- Monitor(s) Displays
- 21" LG & "19 Vertical Samsung
- Hard Drives
- 120GB SSD - Boot
1TB WD
350GB External
2TB External (Wireless)
- PSU
- Corsair CX 500 modular
- Case
- Zalman Z11 Plus (modified)
- Cooling
- Corsair H55, 2x 120mm SP Corsair, 1x 140 Coolermaster
- Keyboard
- Corsair K50
- Mouse
- CSL Gaming
- Internet Speed
- 164Mbps
- Antivirus
- Avast, Malwarebytes
- Browser
- Google Chrome, IE, Firefox
