第一题:窗体放置四个标签数组1、四个标签数组2,二定时器,代码如下:
程序代码:
Dim X As Integer, Y As Integer Private Sub Form_Load() For I = 0 To 4 Label1(I).Caption = "" Label1(I).Visible = True Label2(I).Visible = True Next I Label1(0).Caption = "你的姓名" Label1(1).Caption = "你的学号" Label1(2).Caption = "你的专业" Label1(3).Caption = "你的班级" Label1(4).Caption = "你的职务" '这些你自己修改为你的信息就可以了 Timer1.Enabled = True Timer1.Interval = 1000 Timer2.Enabled = False Timer2.Interval = 1000 X = 0 End Sub Private Sub Timer1_Timer() X = X + 1 If X = 15 Then For I = 0 To 4 Label1(I).Visible = False Label2(I).Visible = False Next I End If If X = 16 Then Label1(0).Visible = True Label2(0).Visible = True Timer1.Enabled = False Timer2.Enabled = True End If End Sub Private Sub Timer2_Timer() Y = Y + 1 Select Case Y Case 1 Label1(0).ForeColor = &H1000FF Label1(0).FontSize = Label1(0).FontSize + 2 Case 2 Label1(0).ForeColor = &HFF00FF Label1(0).FontSize = Label1(0).FontSize + 2 Case 3 Label1(0).ForeColor = &H9900FF Label1(0).FontSize = Label1(0).FontSize + 2 Case 4 Label1(0).ForeColor = &HFF99FF Label1(0).FontSize = Label1(0).FontSize + 2 Case 5 Label1(0).ForeColor = &HFF8822 Label1(0).FontSize = Label1(0).FontSize + 2 Case 6 Y = 0 Label1(0).ForeColor = &H109901 Label1(0).FontSize = 14 End Select End Sub
符合你的题目要求,其他三题,有时间再做。
[此贴子已经被作者于2016-5-10 13:16编辑过]