Makes a command button blink with a random color each time it is visible.
Makes a command button blink with a random color each time it is visible.
Rate Makes a command button blink with a random color each time it is visible.
(1(1 Vote))
'Add a timer and leave default name "Timer1"
'Add a command button and leave default name "Command1"
'Set the command button style property to "1-graphical"
'Add the following code to the Form load event and Timer1 event
'Enjoy!
'
Private Sub Form_Load()
Timer1.Interval = 900 'The bigger the number the longer the delay
End Sub
Private Sub Timer1_Timer()
If Command1.Visible = True Then
Randomize
Command1.BackColor = RGB(Rnd * 256, Rnd * 256, Rnd * 256)
Command1.Visible = False
Else
Command1.Visible = True
End If
End Sub
Makes a command button blink with a random color each time it is visible. Comments
No comments yet — be the first to post one!
Post a Comment