반응형

* VBNET IP Ping Check 예제...

 

전체 소스 코드

Form1.vb

 

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim bCheck As Boolean
        Try
            bCheck = My.Computer.Network.Ping(TextBox1.Text)

            If bCheck Then
                MessageBox.Show("Ping Check Success...", "확 인", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
            Else
                MessageBox.Show("Ping Check Failed...", "확 인", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End If

        Catch ex As Exception
            bCheck = False
        End Try

    End Sub
End Class

 

*예제 결과

 

 

반응형

+ Recent posts