📄 网络测试.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "网 络 测 试"
ClientHeight = 5445
ClientLeft = 60
ClientTop = 345
ClientWidth = 9375
Icon = "网络测试.frx":0000
LinkTopic = "Form1"
ScaleHeight = 5445
ScaleWidth = 9375
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
Height = 4275
Left = 210
TabIndex = 0
Top = 810
Width = 8925
Begin VB.TextBox Text1
Alignment = 1 'Right Justify
Height = 345
Index = 3
Left = 1860
TabIndex = 21
Top = 3660
Width = 3165
End
Begin VB.TextBox Text1
Alignment = 1 'Right Justify
Height = 345
Index = 2
Left = 1860
TabIndex = 20
Top = 3024
Width = 3165
End
Begin VB.TextBox Text1
Alignment = 1 'Right Justify
Height = 345
Index = 1
Left = 1860
TabIndex = 19
Top = 2388
Width = 3165
End
Begin VB.TextBox Text1
Alignment = 1 'Right Justify
Height = 345
Index = 0
Left = 1860
TabIndex = 18
Top = 1770
Width = 3165
End
Begin VB.TextBox Text6
Alignment = 1 'Right Justify
BorderStyle = 0 'None
Height = 195
Left = 4620
TabIndex = 16
Top = 570
Width = 315
End
Begin VB.TextBox Text5
Alignment = 1 'Right Justify
BorderStyle = 0 'None
Height = 195
Left = 4140
TabIndex = 15
Top = 570
Width = 315
End
Begin VB.TextBox Text4
Alignment = 1 'Right Justify
BorderStyle = 0 'None
Height = 195
Left = 3600
TabIndex = 14
Top = 570
Width = 315
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H80000000&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 3075
Left = 5220
Picture = "网络测试.frx":030A
ScaleHeight = 3075
ScaleWidth = 3615
TabIndex = 12
Top = 390
Width = 3615
Begin VB.Label Label4
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 360
Left = 1695
TabIndex = 22
Top = 510
Width = 225
End
End
Begin VB.CommandButton Command2
Caption = "退 出"
Height = 315
Left = 7050
TabIndex = 11
Top = 3720
Width = 1305
End
Begin VB.CommandButton Command1
Caption = "下一地址"
Height = 315
Left = 5730
TabIndex = 10
Top = 3720
Width = 1305
End
Begin VB.TextBox Text3
Alignment = 1 'Right Justify
BorderStyle = 0 'None
Height = 195
Left = 3090
TabIndex = 1
Top = 570
Width = 315
End
Begin VB.TextBox Text2
Alignment = 1 'Right Justify
Height = 345
Left = 1860
TabIndex = 8
Top = 1116
Width = 3165
End
Begin VB.Label Label11
BackStyle = 0 'Transparent
Caption = "."
Height = 30
Left = 4920
TabIndex = 17
Top = 660
Width = 30
End
Begin VB.Label Label10
BackColor = &H80000009&
BorderStyle = 1 'Fixed Single
Caption = " . . ."
Height = 345
Left = 1860
TabIndex = 13
Top = 480
Width = 3165
End
Begin VB.Label Label7
Caption = "接收数据:"
Height = 255
Left = 300
TabIndex = 7
Top = 3750
Width = 1455
End
Begin VB.Label Label6
Caption = "数据包大小:"
Height = 255
Left = 300
TabIndex = 6
Top = 3102
Width = 1455
End
Begin VB.Label Label5
Caption = "耗时:"
Height = 255
Left = 300
TabIndex = 5
Top = 2454
Width = 1455
End
Begin VB.Label Label3
Caption = "返回状态:"
Height = 255
Left = 300
TabIndex = 4
Top = 1806
Width = 1455
End
Begin VB.Label Label2
Caption = "发送串:"
Height = 255
Left = 300
TabIndex = 3
Top = 1158
Width = 1455
End
Begin VB.Label Label1
Caption = "IP 地址:"
Height = 255
Left = 300
TabIndex = 2
Top = 510
Width = 1455
End
End
Begin VB.Shape Shape1
BorderColor = &H80000001&
BorderWidth = 2
Height = 585
Left = 2520
Shape = 4 'Rounded Rectangle
Top = 90
Width = 4005
End
Begin VB.Label Label9
Caption = "网 络 测 试"
BeginProperty Font
Name = "华文新魏"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2850
TabIndex = 9
Top = 150
Width = 3525
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Text2_KeyPress(KeyAscii As Integer)
Dim Echo As ICMP_ECHO_REPLY, Add As String
Dim pos As Integer
If KeyAscii = 13 Then
Add = Text3 & "." & Text4 & "." & Text5 & "." & Text6
Call Ping(Add, Echo)
Text1(0) = GetStatusCode(Echo.Status)
Text1(1) = Echo.RoundTripTime & " ms"
Text1(2) = Echo.DataSize & " bytes"
Label4 = GetStatusCode(Echo.Status)
If Left$(Echo.Data, 1) <> Chr$(0) Then
pos = InStr(Echo.Data, Chr$(0))
Text1(3) = Left$(Echo.Data, pos - 1)
End If
Command1.SetFocus
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text4.SetFocus
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text5.SetFocus
End If
End Sub
Private Sub Text5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text6.SetFocus
End If
End Sub
Private Sub Text6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Command1_Click()
Dim I As Integer
Text2 = "": Text3 = "": Text4 = ""
Text5 = "": Text6 = ""
Label4 = ""
For I = 0 To 3
Text1(I) = ""
Next
Text3.SetFocus
End Sub
Private Sub Command2_Click()
Unload Me
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -