【VISUAL VB NET】Ping

 Imports System

Imports System.Collections.Generic Imports System.ComponentModel Imports System.Data Imports System.Drawing Imports System.Linq Imports System.Text Imports System.Threading.Tasks Imports System.Windows.Forms ' make sure that using System.Diagnostics; is included Imports System.Diagnostics ' make sure that using System.Security.Principal; is included Imports System.Security.Principal ' make sure that using System.Net.NetworkInformation; is included Imports System.Net.NetworkInformation ' make sure that using System.Threading; is included for method Sleep Imports System.Threading Public Class Form1 Public Sub New() MyBase.New() InitializeComponent() End Sub Private Sub button1_Click(sender As Object, e As EventArgs) Handles button1.Click For i As Integer = 0 To 3 ' Thread.Sleep(500); Using p As New Ping() ' label1.Text = p.Send("www.google.com").RoundtripTime.ToString() + "ms"; listView1.Items.Add(p.Send("www.google.com").RoundtripTime.ToString() & "ms" & vbLf) End Using Next End Sub End Class

No comments:

Renowned Water Expert Reynold Aquino Offers Exclusive Water Softener Discounts

Los Angeles, California - November 21, 2024 - World-renowned water expert Reynold Aquino is excited to announce exclusive discounts on prem...

Contact Form

Name

Email *

Message *