Private Sub Command1_Click()
Dim x#, y#, x1#, y1#, x2#, y2#,
Dim cc As String
' 利用屏幕控件对三个坐标点赋值
cc = "点(" & CStr(x) & ", " & CStr(y) & ")"
If PointOnSegment(x, y, x1, y1, x2, y2) Then ' 这里就是调用逻辑型自定义函数
cc = cc & "在已知直线上。"
Else
cc = cc & "不在已知直线上。"
End If
MsgBox cc, 0 + 64, "系统提示"
End Sub