by Ahamed Saifudeen (11 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Fri 19th March 2004
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
Design an Alarm with a few lines of code
API Declarations
'Controls
'One Timer - Interval 1000
'One Text box- Get the time here
'One Command Button - Name: Set
Dim a As Date
a=Text1.Text
Timer1.Enabled=True
End Sub
Private Sub Form_Load()
Timer1.Enabled=False
Text1.Text=Time
End Sub
Private Sub Timer1_Timer()
If a-Time=0 Then
Msgbox "You have asked me to remind you at this time","Alarm"
Timer1.Enabled=False
End Sub