NightShade01
Member
- Joined
- Jul 7, 2006
- Messages
- 5
- Programming Experience
- 1-3
Hey all I'm trying to create a simple little alarm clock app that will just play a sound when the alarm time is set. my prob is that once i get the user to set the alarm time the alarm never goes off at the time.
Here is what i have so far...
PublicSub alarmOn()
If (alarmState = True) Then
If (hours = TimeOfDay.Hour And mins = TimeOfDay.Minute) Then
PlaySound()
EndIf
Else
MsgBox("Please set the alarm time first.", , "Alarm Not Set")
EndIf
EndSub
PrivateSub lblSet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblSet.Click
Dim num1 AsDouble
Dim num2 AsDouble
num1 = System.Convert.ToDouble(txthours.Text)
num2 = System.Convert.ToDouble(txtmins.Text)
If ((num1 > 0) And (num1 <= 12)) And ((num2 >= 0) And (num2 <= 59)) Then
hours = num1
mins = num2
Else
MsgBox("Time not set in the right format. Example: 08:12 ", , )
EndIf
lblSet.Hide()
txthours.Hide()
txtmins.Hide()
EndSub
suggestions.....?
Here is what i have so far...
PublicSub alarmOn()
If (alarmState = True) Then
If (hours = TimeOfDay.Hour And mins = TimeOfDay.Minute) Then
PlaySound()
EndIf
Else
MsgBox("Please set the alarm time first.", , "Alarm Not Set")
EndIf
EndSub
PrivateSub lblSet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblSet.Click
Dim num1 AsDouble
Dim num2 AsDouble
num1 = System.Convert.ToDouble(txthours.Text)
num2 = System.Convert.ToDouble(txtmins.Text)
If ((num1 > 0) And (num1 <= 12)) And ((num2 >= 0) And (num2 <= 59)) Then
hours = num1
mins = num2
Else
MsgBox("Time not set in the right format. Example: 08:12 ", , )
EndIf
lblSet.Hide()
txthours.Hide()
txtmins.Hide()
EndSub
suggestions.....?