Guest User

Untitled

a guest
Jul 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. Private Sub finalcountdown_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles finalcountdown.Tick
  2. If NYTimer > Date.Now Then
  3. Dim remainingTime As TimeSpan = Me.NYTimer.Subtract(Date.Now)
  4. Dim countdowncolor As Integer = remainingTime.Seconds
  5. countdown.Text = String.Format(remainingTime.Seconds)
  6. If colourvariant(countdowncolor, 3) = True Then
  7. Dim alpha As Integer = CInt(Int((254 * Rnd()) + 0)), R As Integer = CInt(Int((254 * Rnd()) + 0)), G As Integer = CInt(Int((254 * Rnd()) + 0)), B As Integer = CInt(Int((254 * Rnd()) + 0))
  8. countdown.BackColor = Color.FromArgb(alpha, R, G, B)
  9. End If
  10. Else
  11. Me.finalcountdown.Stop()
  12. MsgBox("HAPPY NEW YEAR!")
  13. End If
  14. End Sub
Add Comment
Please, Sign In to add comment