English Sentence Loading...
英语句子加载中...

用VB制作闪烁效果的Label

其实没有直接的方式可以如同在Dos环境中,有所谓"闪烁"字型的设定,那只有透过
Timer来设定字体的出现、消失模拟。

'在Form中放数个Label与一个timer
'如果我们设定Label的Tag属性为"1",那该Label便会闪烁
Private Sub Form_Load()
Label1.Tag = "1"
Timer1.Interval = 500
End Sub

Private Sub Timer1_Timer()
Dim ctl As Control
For Each ctl In Me
     If TypeOf ctl Is Label And ctl.Tag = "1" Then
        ctl.Visible = Not ctl.Visible
     End If
Next
End Sub
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: VB 闪烁 Label
相关日志:
评论: 0 | 引用: 0 | 查看次数: 49754