Blinking button text 
Author Message
 Blinking button text

I'm trying to get a button's ForeColor to change periodically when the
current record of the form it's in is Dirty.  Here's my code thus far:

Private Sub Form_Timer()
  If Me.Dirty Then    'If record is dirty, blink Print Record btn.
    Me.PrintRecord.ForeColor = _
      IIf(Me.PrintRecord.ForeColor = 0, _
        Me.PrintRecord.ForeColor = 8404992, _
        Me.PrintRecord.ForeColor = 0)
    Me.Repaint
  ElseIf (Me.PrintRecord.ForeColor <> 0) Then
    Me.PrintRecord.ForeColor = 0
    Me.Repaint
  End If
End Sub

However, it doesn't work; the color never changes, and debug output
appears to verify that the .ForeColor property never even changes.

Am I missing something here?

--
joel thornton
mirage marketing



Sat, 08 Jul 2000 03:00:00 GMT  
 Blinking button text

It seems a very long winded way of getting a button to flash. You could try
a doevents before the elseif.



Quote:
> I'm trying to get a button's ForeColor to change periodically when the
> current record of the form it's in is Dirty.  Here's my code thus far:

> Private Sub Form_Timer()
>   If Me.Dirty Then    'If record is dirty, blink Print Record btn.
>     Me.PrintRecord.ForeColor = _
>       IIf(Me.PrintRecord.ForeColor = 0, _
>         Me.PrintRecord.ForeColor = 8404992, _
>         Me.PrintRecord.ForeColor = 0)
>     Me.Repaint
>   ElseIf (Me.PrintRecord.ForeColor <> 0) Then
>     Me.PrintRecord.ForeColor = 0
>     Me.Repaint
>   End If
> End Sub

> However, it doesn't work; the color never changes, and debug output
> appears to verify that the .ForeColor property never even changes.

> Am I missing something here?

> --
> joel thornton
> mirage marketing



Sat, 08 Jul 2000 03:00:00 GMT  
 Blinking button text

 Private Sub Form_Timer()
  If Me.Dirty And Me.PrintRecord.ForeColor = 0 Then
    Me.PrintRecord.ForeColor = 8404992
    Me.Repaint
  ElseIf (Me.PrintRecord.ForeColor <> 0) Then
    Me.PrintRecord.ForeColor = 0
    Me.Repaint
  End If
End Sub

(And be sure the Timer value is set, I tried 750 and looked good)

--
\                                           /
  \   Brian Mailloux              /

/                                          \

Quote:
>I'm trying to get a button's ForeColor to change periodically when the
>current record of the form it's in is Dirty.  Here's my code thus far:

>Private Sub Form_Timer()
>  If Me.Dirty Then    'If record is dirty, blink Print Record btn.
>    Me.PrintRecord.ForeColor = _
>      IIf(Me.PrintRecord.ForeColor = 0, _
>        Me.PrintRecord.ForeColor = 8404992, _
>        Me.PrintRecord.ForeColor = 0)
>    Me.Repaint
>  ElseIf (Me.PrintRecord.ForeColor <> 0) Then
>    Me.PrintRecord.ForeColor = 0
>    Me.Repaint
>  End If
>End Sub

>However, it doesn't work; the color never changes, and debug output
>appears to verify that the .ForeColor property never even changes.

>Am I missing something here?

>--
>joel thornton
>mirage marketing



Sat, 08 Jul 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. BLink blink blink

2. Blinking command button

3. Blinking Text???

4. BLINKING TEXT?

5. blinking cursor in text boxes????????

6. Blinking text refreshes.

7. rich text box and blinking characters

8. Inverted and blinking text?

9. Blinking Text/Label

10. Text box ... change the blinking cursor

11. making labels and/or text fields blink

12. RichTextBox blinks when appending text

 

 
Powered by phpBB® Forum Software