Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
TextBox1.Text += 1
Try
Dim Range As TcpClient = New TcpClient("192.168.0.1", TextBox1.Text)
If Range.Connected = True Then
ListBox1.Items.Add(TextBox1.Text & " is Open")
End If
Catch ex As Exception
ListBox1.Items.Add(TextBox1.Text & " is Closed")
ListBox1.SelectedIndex = ListBox1.SelectedIndex + 1
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = True
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Enabled = False
End Sub
End Class
0 ~ 65535 범위
이 댓글을