All pastes #89997 Raw Edit

Someone

public text v1 · immutable
#89997 ·published 2006-07-17 06:16 UTC
rendered paste body
' frmEasyClock (MAIN FORM)

Option Explicit

Private cAlarm As String
Private cTime As String


Private Sub cmdOptions_Click()
    frmOptions.Show
End Sub

Private Sub cmdSet_Click()
    ' Set time label to the time we entered
    cAlarm = txtAlarmTime
    
    ' Set alarm label to the alarm time we set.
    lblATime = txtAlarmTime
End Sub

Private Sub cmdSnooze_Click()
    ' Force sound to stop playing
    Call PlayWav(vbNullString)
    
    ' Stop the timer, we are done!
    tmrSound.Enabled = False
    
    cmdSnooze.BackColor = vbRed
End Sub

Private Sub Form_Load()
   ' Automatically put a time value in out textbox
       
    txtAlarmTime = Time
    lblATime.Caption = "00:00:00"
    tmrSound.Enabled = False
End Sub

Private Sub tmrCurrTime_Timer()
    lblCurrTime.Caption = Time
    
    If lblCurrTime = lblATime Then tmrSound.Enabled = True
End Sub

Private Sub tmrSound_Timer()
    If frmOptions.lblSelectedSound.Caption = "Rooster" Then
        Call PlayWav(App.Path & "\rooster.wav")
    End If
    If frmOptions.lblSelectedSound.Caption = "High Pitch Sound" Then
        Call PlayWav(App.Path & "\3beeps.wav")
    End If
End Sub