I'm making an alarm clock whose form's backColor should change randomlly every 5 seconds. I am not sure as to how to do this. I'm using a timer so after the alarm clock's given time matches the current time, a song will be played. But I do not know how to count the seconds, or milliseconds that pass after starting time.
Member #906704
Recommended Answers
Jump to Post— codeorder 197See if this helps.
Public Class Form1 Private WithEvents tmrMain As New Timer With {.Interval = 2000, .Enabled = True} Private rnd As New Random Private Sub tmrMain_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmrMain.Tick Static r, g, b As Integer r = rnd.Next(0, 256) …
All 3 Replies
Reply to this topic Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.