Hack Forums
[.NET] Ping Tool - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Ping Tool (/showthread.php?tid=3581361)



Ping Tool - shock_y0 - Jun 27, 2013

Hey
because im registered since 2 years and i never released something i want to do it today. Noting special just only a Ping-Tool that shows your Ping in ms.

Screenshot:

[Image: mvkwUZy.png]

Binary Download: https://mega.co.nz/#!VkVlhBqA!JkQjiWp1KQgAeyfMTMpUbHf5QKlzdXVUFjVLlC34xvA

Binary Virustotal: https://www.virustotal.com/de/file/988668d082d0b6fac88ced93dcadd7213eeb08e5b997fff93bd63fdafb8e58f2/analysis/1372360222/

Download Source: https://mega.co.nz/#!810VAZ7Z!Ifd7Y1JxEXcFgv13U17Wqi-TXlJgEJxudjx1nRxdGfE

Have fun with this small tool.

Thanks for reading

Best Regards
shocK 🤝

Changelog:
Code
28.06.13 v1.1 - Update
- Added History
- Added Copy Function
27.06.13 v1.0 - First Release



* - ИYYИ - Jun 27, 2013

Most of us already knew how to do a simple task such as this, but thanks anyways.


* - Cody8295 - Jun 27, 2013

Source for anybody who doesn't want to download:

Code
Option Strict On

Imports System.Net

Public Class Form1

    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(sender As Object, 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"
    ToolStripStatusLabel1.Text = "idle..."
    TextBox1.Enabled = True
  End If

    End Sub

    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
  Dim ms As Long = DoPing(TextBox1.Text)

  If ms >= 0 Then
    ToolStripStatusLabel1.Text = "Ping: " & ms.ToString & "ms"
  Else
    ToolStripStatusLabel1.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_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed
  My.Settings.host = TextBox1.Text
    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  TextBox1.Text = My.Settings.host
    End Sub

    Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles Me.Shown
  TextBox1.Focus()
    End Sub
End Class



* - shock_y0 - Jun 27, 2013

(Jun 27, 2013 12:28 PM)Beηj Wrote:  Most of us already knew how to do a simple task such as this, but thanks anyways.

Yeah i know but the most of this only get a return connection yes or no and this give a feedback in ms. ✌


* - Lightsout - Jun 27, 2013

is this really necessary? For One Tool? Come on...


* - Finearts - Jun 27, 2013

Simple,but thanks for releasing
Might use it for something in the future


* - g0d3z - Jun 27, 2013

OP what is that theme you are using?


* - shebang - Jun 27, 2013

Although the tool is simple, it's very clean. @g0d3z, I assume he's using something along the lines of a WindowBlinds theme.


* - shock_y0 - Jun 27, 2013

(Jun 27, 2013 01:06 PM)g0d3z Wrote:  OP what is that theme you are using?

Its a Windows 7, not a VB theme sorry
i can upload it for you if you need this

edit: https://mega.co.nz/#!lsckWaQJ!IEKHQGMPm3Np6FokfceeHGIDMx8hGW2RSLZz6hZnvz4


* - Trollkarlen - Jun 27, 2013

Very simple but thanks anyway 🤝


* - C0RE1337 - Jun 27, 2013

Thanks for this useful Release. I hope i ll seen more of you


* - shock_y0 - Jun 28, 2013

Updated cause i'm bored. take a look at changelog


* - assasaha - Aug 28, 2013

Thanks Brother... Nice Coding :)

"Try And Error"


* - BladeZ201 - Aug 29, 2013

Thanks for the source! and nice theme