My goal is to make code that will beep randomly anywhere from 1 to 30 seconds apart. Here is my code so far:
Public Class Form1
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Console.Beep()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Stop()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
End Sub
End Class
This beeps every one second. Now, I want to change the Timer
Interval so that it will beep randomly between 1 and 30 seconds. Maybe later I will add options for the user to define the bounds, but for now, 1 and 30 are good numbers. I just don't know how to apply a random number to my Timer Interval.