我有一个label控件,还是写出来吧
Private Sub Timer1_Timer()
Label3.Caption = "方悦数码"
Label3.Caption = "精益求精"
end sub
怎样利用timer将这两句不停的循环?

解决方案 »

  1.   

    Private Sub Timer1_Timer()
        Static blnJ As Boolean
        
        If blnJ Then
            Label3.Caption = "方悦数码"
        Else
            Label3.Caption = "精益求精"
        End If
        
        blnJ = Not blnJEnd Sub
      

  2.   

    Private Sub Timer1_Timer()
        Static blnJ As Boolean
        Timer1.inrerval=1000'1000为循环时间,单位毫秒
        If blnJ Then
            Label3.Caption = "方悦数码"
        Else
            Label3.Caption = "精益求精"
        End If
        
        blnJ = Not blnJEnd Sub
      

  3.   


    误导应当是Private Sub Form_Load()
        
        Timer1.Interval=1000    '1000为循环时间,单位毫秒End SubPrivate Sub Timer1_Timer() 
        Static blnJ As Boolean 
     
        If blnJ Then 
            Label3.Caption = "方悦数码" 
        Else 
            Label3.Caption = "精益求精" 
        End If 
        
        blnJ = Not blnJ End Sub
      

  4.   

    if a=1 then 
    Label3.Caption = "方悦数码" 
    else
    Label3.Caption = "精益求精" end ifa=! a
      

  5.   


    Option Explicit
        Dim lblFlag As BooleanPrivate Sub Form_Load()
        Timer1.Interval = 1000
        Timer1.Enabled = True
    End SubPrivate Sub Timer1_Timer()
        If lblFlag Then
            Label1.Caption = "方悦数码"
        Else
            Label1.Caption = "精益求精"
        End If
        lblFlag = Not lblFlag
    End Sub
      

  6.   

    多谢各位,我自己也是这么想的,结果也实现了
    只是多了一个if语句,把分给jhone99吧,他是第一个回答对的.
    顺便再问一下,如果再多一条信息,又该怎么实现?