7,765
社区成员
发帖
与我相关
我的任务
分享
Private Sub Command1_Click()
Dim str As String
Command1.Visible = False
Randomize Timer
str = ""
Open "c:\vb.txt" For Output As #1
While j < 10
q = Int(Rnd(1) * 369 + 1)
Label1.Caption = q: DoEvents
If n(q) = 0 And bStop = True Then
str = str & q & Chr(13) & Chr(10)
n(q) = 1
j = j + 1
bStop = False
End If
Wend
If str <> "" Then
Print #1, str
End If
Close #1
End Sub
Private Sub Command1_Click()
Command1.Visible = False
Randomize Timer
Open "c:\vb.txt" For Output As #1
While j < 10
q = Int(Rnd(1) * 369 + 1)
Label1.Caption = q: DoEvents
If n(q) = 0 And bStop = True Then
Print #1, q
n(q) = 1
j = j + 1
bStop = False
End If
Wend
Close #1
End Sub