home *** CD-ROM | disk | FTP | other *** search
-
- Public Sub Flash(NumTimes As Integer)
-
- Dim booButtonLighted As Boolean
- Dim intFlashLoop As Integer
- Dim sinOldTimer As Single
-
- ' If an invalid argument was passed to the
- ' method, exit now.
- If NumTimes <= 0 Then Exit Sub
-
- booButtonLighted = mbooButtonLighted
-
- For intFlashLoop = 1 To (NumTimes * 2)
- ' Switch the button's status.
- booButtonLighted = Not booButtonLighted
- If booButtonLighted = True Then
- ' Change the control's background color or
- ' image to reflect a "selected" state.
- If mmodButtonMode = [Text Only Mode] Then
- UserControl.BackColor = molcSelColor
- Else
- Set UserControl.Picture = mpicSelPicture
- End If
- Else
- ' Change the control's background color or
- ' image to reflect an "unselected" state.
- If mmodButtonMode = [Text Only Mode] Then
- UserControl.BackColor = molcBackColor
- Else
- Set UserControl.Picture = mpicPicture
- End If
- End If
- ' Wait a short amount of time before changing the
- ' control's status again.
- sinOldTimer = Timer
- Do
- DoEvents
- Loop Until (Timer >= sinOldTimer + 0.5)
- Next intFlashLoop
-
- End Sub
-