vb程序里有多个label控件,怎么用一个按钮让label控件一个一个显示出来,
展开全部
Dim i
Dim sc As Object
Private Sub Form_Load()
Set sc = CreateObject("scriptcontrol")
sc.Language = "VBscript"
sc.AddObject "form1", Form1
Timer1.Enabled = False
Timer1.Interval = 1000
For j = 1 To 4
sc.ExecuteStatement "Form1.Label" & j & ".Visible= false"
Next
End Sub
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Set sc = CreateObject("scriptcontrol")
sc.Language = "VBscript"
sc.AddObject "form1", Form1
i = i + 1
If i <= 4 Then sc.ExecuteStatement "Form1.Label" & i & ".Visible= true"
End Sub
不知道有什么用。。。。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询