Blinking Text??? 
Author Message
 Blinking Text???

I been trying to locate some code which would cause a text box to blink if
the value were "suspended".  Any ideas?  I've been looking through all my
books and nothing!!


Sun, 10 Mar 2002 03:00:00 GMT  
 Blinking Text???
Try this out,  I use it all the time to make the label next to the text box
flash when customer has not credit.

    'I put this in the form current event
   'sets timer function to flash if required
    If Me.[CreditCustomer] = False Then
        Me.TimerInterval = 500
    Else
        Me.TimerInterval = 0
        Me.CreditCustomer_Label.ForeColor = vbBlack
    End If

Private Sub Form_Timer()
    'flashes the credit label if customer does not have credit
    With Me.CreditCustomer_Label
        .ForeColor = (IIf(.ForeColor = vbRed, vbBlack, vbRed))
    End With

End Sub


Quote:
> I been trying to locate some code which would cause a text box to blink if
> the value were "suspended".  Any ideas?  I've been looking through all my
> books and nothing!!



Sun, 10 Mar 2002 03:00:00 GMT  
 Blinking Text???
Well I know I saw something like that on Dev Ashish's site, but here's
is what I would do, a simple solution.  Create a timer function on your
form, and have the timer function determine if your "Suspended"
condition exists.  If it does, then put in the If Then statement, code
that would change the ForeColor of the Text, or the Background color.
The trick is, you would need it to cycle through the colors, so have It
determine which color it is, so that it cycles....here's an example

Dim Criteria
Dim NoRepeat
NoRepeat="No"

If Criteria= True Then
     If Forms![YourFormName]![YourControlName].ForeColor=0 Then
          Forms![YourFormName]![YourControlName].ForeColor=600
          NoRepeat="Yes"
     End if
     If Forms![YourFormName]![YourControlName].ForeColor=600 And
NoRepeat="No" Then
          Forms![YourFormName]![YourControlName].ForeColor=0
     End if
End if

I just made up numbers for the colors, and you could use
BackgroundColor, instead of ForeColor. You have to put a NoRepeat
Variable in there so that it doesn't try to change the color back to
the original color in the same timer instance.  Then just set your
timer so that it cycles the colors at the flash rate that you want!!!

Hope that helps!

Crying Wolf



Quote:
> I been trying to locate some code which would cause a text box to
blink if
> the value were "suspended".  Any ideas?  I've been looking through
all my
> books and nothing!!

--
He who learns but does not think is lost, he who thinks but does not lea

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Mon, 11 Mar 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. BLINKING TEXT?

2. Blinking text refreshes.

3. Inverted and blinking text?

4. Blinking Text/Label

5. Help with blinking text!

6. blinking text

7. blinking text

8. Blinking Text

9. BLink blink blink

10. Blinking button text

11. blinking cursor in text boxes????????

12. rich text box and blinking characters

 

 
Powered by phpBB® Forum Software