Results 1 to 4 of 4

Thread: flashing text in a textbox

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2000
    Location
    Sydney, Nova Scotia
    Posts
    55
    How do you make the text flash in a textbox?

    When an event adds text to a box, I'd like for it to flash..... Any easy way to do this?
    Vince McMullin
    Aka Vam, Vinny Mac

    Its just that simple

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Flash? you mean like blinking?
    That's easy, just add a timer with an interval of say, 1 second (1000 milliseconds)

    Code:
    'In the general declerations put:
    Public orgstring as String
    
    'In the sub you want to start the blinking put:
    orgstring = Text1.Text
    
    'In the timer event put
    If Text1.Text = orgstring Then
       Text1.Text = ""
    Else
       Text1.Text = orgstring
    End If
    Haven't test it, but it should work
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  3. #3
    Guest

    Lightbulb Or........

    Or you could try this,
    it works the same, but it is a little less complicated, since it uses booleans

    Code:
    Public strBlink As String
    Dim blnEnable As Boolean
    
    
    Private Sub Command1_Click()
        strBlink = Text1.Text
        Timer1.Enabled = True
    End Sub
    
    Private Sub Timer1_Timer()
        blnEnable = Not blnEnable
        If blnEnable = True Then
            Text1.Text = ""
        ElseIf blnEnable = fale Then
            Text1.Text = orgstring
        End If
    End Sub

  4. #4

    Thread Starter
    Member
    Join Date
    Jul 2000
    Location
    Sydney, Nova Scotia
    Posts
    55

    difference?

    Would it matter if the text is being sent from the module to the textbox after a function is performed?
    Vince McMullin
    Aka Vam, Vinny Mac

    Its just that simple

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width