blinking textbox in vb

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • awaz
    New Member
    • Mar 2008
    • 3

    blinking textbox in vb

    hi ineed your help on creating a blinking textbox or label that changes color may be from blue to red.thanx waitin for your response.
  • jamesd0142
    Contributor
    • Sep 2007
    • 471

    #2
    Try using a timer and use code such as...

    timer interval = 2000
    textbox1.backco lour = red
    system.threadin g.thread.sleep( 1000)
    textbox1.backco lour = green
    system.threadin g.thread.sleep( 1000)

    or
    timer interval = 1000
    if textbox1.backco lour = red then
    textbox1.backco lour = blue
    else
    textbox1.backco lour = red
    end if

    Comment

    • smartchap
      New Member
      • Dec 2007
      • 236

      #3
      Try this:

      Private Sub Form_Load()
      Timer1.Enabled = True
      End Sub

      Private Sub Timer1_Timer()
      'set interval=500 or 1000 as per ur requirement.
      If Text1.BackColor = vbBlue Then
      Text1.BackColor = vbRed
      Else
      Text1.BackColor = vbBlue
      End If

      End Sub

      Comment

      Working...