实现上述功能的VB程序如下,请在划线处填入合适代码。
Private Sub Command1_Click()
Dim i As Integer, n As Integer
Dim x As Single, y As Single, x1 As Single, y1 As Single
Dim d As Single, min As Single
Dim s As String, t As String
s = Text1.Text: x = 25: y = 35 'A点坐标
n = 0: min = -1: t = ""
For i = 1 To
If Mid(s, i, 1) = "," Then
n = n + 1
If Then
x1 = Val(t)
Else
y1 = Val(t)
d =
If min = -1 Then min = d
If d < min Then min = d
End If
t = ""
Else
t = t + Mid(s, i, 1)
End If
Next i
Label3.Caption = Str(min)
End Sub