Public j As Integer
Dim A() As String
Dim tem As String
Private Sub CMD1_Click() '注意这里如果没有exit sub,责会出现captio不会变的,其实已经变过了
If CMD1Caption = "开始" Then
CMD1Caption = "停止"
Timer1Enabled = True
Exit Sub
End If
If CMD1Caption = "停止" Then
CMD1Caption = "开始"
Timer1Enabled = False
If tem <> "" Then
Text1Text = tem
End If
End If
End Sub
Private Sub CMD2_Click()
Frame1Visible = True
Text2Visible = True
CMD3Visible = True
CMD4Visible = True
End Sub
Private Sub CMD3_Click()
Text2Visible = False
CMD3Visible = False
CMD4Visible = False
tem = Text2Text
End Sub
Private Sub CMD4_Click()
Text2Text = ""
Text2Visible = False
CMD3Visible = False
CMD4Visible = False
End Sub
Private Sub form_load()
Frame1Visible = False
Text2Visible = False
CMD3Visible = False
CMD4Visible = False
Timer1Enabled = False
Timer1Interval = 300
Open "C:\Documents and Settings\Administrator\桌面\新建 文本文档txt" For Input As 1
Do Until EOF(1)
ReDim Preserve A(0 To I)
Input #1, A(I)
I = I + 1
Loop
Close #1
End Sub
Private Sub Timer1_Timer()
Text1Text = A(j)
j = j + 1
If j = UBound(A) Then
j = 0
End If
End Sub
已经运行通过,不过事先你得在桌面建立一个文本文件,用来存储数据,呵呵
以上就是关于我们班有53个同学,想用VB编写一个随机抽签的程序。上课随机抽人讲题用~ 求源代码。全部的内容,包括:我们班有53个同学,想用VB编写一个随机抽签的程序。上课随机抽人讲题用~ 求源代码。、求一个分组抽签程序,谢谢了,java、vb比赛分组抽签程序:编写一个比赛分组抽签程序,把八支队伍(中、美、巴西、古巴、俄罗斯、荷兰、德国、日等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)