About:
A program to replicate an alarm clock. The user enters a time, and the programme will display a MessageBox when the alarm hits.
Controls:
A program to replicate an alarm clock. The user enters a time, and the programme will display a MessageBox when the alarm hits.
Controls:
- 4 Labels
- 1 Textbox
- 1 Button
Format: (See image)
Code:
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Label1.Text = "Time"
Label2.Text = "Alarm"
Label3.Text = ""
Label4.Text = ""
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Label3.Text = TimeOfDay
If Label4.Text = Label3.Text Then
Label4.Text = ""
MsgBox("Alarm Message!")
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Label4.Text = TextBox1.Text
End Sub
End Class