VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



ALARAM CLOCK

by Debashish Pattnaik (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 4th September 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

ALARAM CLOCK

API Declarations


Option Explicit
Dim Time$
Dim f As Boolean

Rate ALARAM CLOCK



'on approaching the given time it will give beep sound till user clicks 
'on stop button.

Private Sub settimebutton_Click()
On Error GoTo 0

If Not IsDate(Text1) Or Trim(Text1) < Format(Now, "hh:mm:ss") Then
Text1.Text = ""
Text1.SetFocus
Exit Sub
Else
Text1.Enabled = False
Timer1.Enabled = True
f = True
settimebutton.Enabled = False
End If

End Sub

Private Sub stopbutton_Click()
Timer1.Enabled = False
Text1.Enabled = True
Text1.Text = ""
Text1.SetFocus
f = False
stopbutton.Enabled = False
settimebutton.Enabled = True

End Sub



Private Sub Command4_Click()
Beep
End Sub


Private Sub Form_Load()
Timer1.Enabled = False
StatusBar1.Panels(2) = Format(Date, "dd/mm/yyyy")
End Sub

Private Sub Text1_gotfocus()
StatusBar1.Panels(1) = "Deba's Alaram"
End Sub

Private Sub Timer1_Timer()
Time$ = Format(Now, "hh:mm:ss")
 If (Time$ > CDate(Text1.Text) And f) Then
        stopbutton.Enabled = True
        Beep
       
    End If
    
      
End Sub

Private Sub Timer2_Timer()
curtimelabel.Caption = Format(Now, "hh:mm:ss")

End Sub


Download this snippet    Add to My Saved Code

ALARAM CLOCK Comments

No comments have been posted about ALARAM CLOCK. Why not be the first to post a comment about ALARAM CLOCK.

Post your comment

Subject:
Message:
0/1000 characters