请问如何让Label控件中的字体闪烁啊?换句话说怎么做一个闪烁字体啊?(用LABEL)
请详细说明 ,最好有代码为偶参考,谢谢大家了

解决方案 »

  1.   

    Private Sub Command1_Click()
    Timer1.Enabled = True
    End SubPrivate Sub Form_Load()
    Timer1.Interval = 100
    Timer1.Enabled = False
    End SubPrivate Sub Timer1_Timer()
    If Label1.Visible = True Then
    Label1.Visible = False
    Else
    Label1.Visible = True
    End IfEnd Sub
      

  2.   

    用Visual Basic我们可设计出形形色色符合用户要求的应用程序,它确实是一种很好的用户 程序开发工具,可VB提供的基本控件中都没有闪烁属性设置,使应用程序界面缺乏“活 性”,近期笔者设计软件封面时,就要求字体不断地闪烁,为此,经反复分析、实践,最后 终于成功地实现字体闪烁效果,现将设计过程说明如下:   (1)创建一个新目标文件(project1),并建立一个窗体Form1。   (2)在Form1上配置一个计时器控制Timer1、标签控件Label1、命令控件Command1。   (3)各控件属性设置:   Timer1的Enabled设置为True;   Label1的Caption设置为需闪烁的字体:“电脑室设计”、 Font设置字体及大小、 Backstyle设置为“0-Transparent";   Command1中的Caption设置为“退出”。   (4)程序代码清单:   Option Explicit   Private Sub Form_ Load()   Label1.Top=850      ′设置闪烁字体的显示位置   Label1.Left=750   Timer1.Interval=555     ′设置字体闪烁间隔时间   Form1.Windowstate=2   End Sub   ′利用计时器控件Timer有规律地改变字体颜色(Forecolor)   Private Sub Timer1_Timer()   Chc Label1,1,4,8   End Sub   ′Chc过程是循环地改变字体颜色(Forecolor)   Sub Chc(Cont As Control,Color1 As Integer,Color2 As Integer,Color3 As Integer)   If Val(Cont.Tag)=Color1 Then   Cont.Tag=Color2   ElseIf Val(Cont.Tag)=Color2 Then   Cont.Tag=Color3   ElseIf Val(Cont.Tag)=Color3 Then   Cont.Tag=Color1   Else  Cont.Tag=Color1   End If   Cont.ForeColor=QBColor(Cont.Tag)   End Sub   Private Sub Command1_Click()   End   End Sub 程序除标签控件外,还适用于许多VB基本控件,实现了动感效果,例如:闪烁文本框、 闪烁文件列表框等,极大丰富了VB应用程序界面,相当实用。此设计也适用VB3.0、VB4.0。 
      

  3.   

    Private Sub Form_Load()
    Timer1.Interval = 100
    Timer1.Enabled = True
    Label1.Tag = 0
    End SubPrivate Sub Timer1_Timer()
    If Label1.Tag = 0 Then
        Label1.ForeColor = vbRed
        Label1.Tag = 1
    Else
        Label1.ForeColor = vbBlue
        Label1.Tag = 0
    End If
    End Sub