1个回答
展开全部
Private Sub Form_click()
Dim x1 As Single, y1 As Single
Dim x2 As Single, y2 As Single
Dim i, n
n = InputBox("请输入直线条数", "输入框")
For i = 1 To n
Randomize
x1 = Int((1000 * Rnd) + 0)
y1 = Int((2000 * Rnd) + 0)
x2 = Int((10000 * Rnd) + x1)
y2 = Int((10000 * Rnd) + y1)
Form1.Line (x1, y1)-(x2, y2)
Next
End Sub
Dim x1 As Single, y1 As Single
Dim x2 As Single, y2 As Single
Dim i, n
n = InputBox("请输入直线条数", "输入框")
For i = 1 To n
Randomize
x1 = Int((1000 * Rnd) + 0)
y1 = Int((2000 * Rnd) + 0)
x2 = Int((10000 * Rnd) + x1)
y2 = Int((10000 * Rnd) + y1)
Form1.Line (x1, y1)-(x2, y2)
Next
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询