今天查了几个C段打算扫下端口但手头也没有生成C段的工具就没事自己搞了个比较简单for嵌套
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If RichTextBox1.TextLength > 0 Then
RichTextBox1.Text = String.Empty
End If
For z As Integer = CInt(TextBox2.Text) To CInt(TextBox3.Text)
For i As Integer = 0 To 255
If z = CInt(TextBox3.Text) And i = 255 Then
RichTextBox1.AppendText(TextBox1.Text & "." & z & "." & i)
Else
RichTextBox1.AppendText(TextBox1.Text & "." & z & "." & i & vbCrLf)
End If
Next
Next
End Sub
End Class
Comments