(VB)VB新手求问.........点击command1后在label1上显示一段文字,几秒后让label1上所显示的文字消失..
新手求问大神........类似于叫号机的那种..点一下显示我是几号...然后文字自己消失...再点一下显示我是下一个号这样如此类推...
新手求问大神........类似于叫号机的那种..点一下显示我是几号...然后文字自己消失...再点一下显示我是下一个号这样如此类推
展开
2个回答
展开全部
'添加一个按钮(commandbutton)和一个标签(label)控件
'代码,这里间隔3秒后消失
Dim ph As Long
Private Declare Function timeGetTime Lib "winmm.dll" () As Long
Private Sub Command1_Click()
Command1.Enabled = False
ph = ph + 1
Label1.Caption = ph & "号"
Savetime = timeGetTime
While timeGetTime < Savetime + 3000
DoEvents
Wend
Label1.Caption = ""
Command1.Enabled = True
End Sub
Private Sub Form_Load()
Label1.Caption = ""
ph = 0
End Sub
'代码,这里间隔3秒后消失
Dim ph As Long
Private Declare Function timeGetTime Lib "winmm.dll" () As Long
Private Sub Command1_Click()
Command1.Enabled = False
ph = ph + 1
Label1.Caption = ph & "号"
Savetime = timeGetTime
While timeGetTime < Savetime + 3000
DoEvents
Wend
Label1.Caption = ""
Command1.Enabled = True
End Sub
Private Sub Form_Load()
Label1.Caption = ""
ph = 0
End Sub
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询