Alarm Scheduler


‘Alarm / Scheduler
‘variable alarm timer

Private strTimerSet
Private sub cmdSet_Click()
strTimeSet=InputBox(“Tetapkan Waktu”&vbCrlf & “Format jam:menit:detik (00:00:00)”)if len(Trim$(strTimeSet))=0 then
Exit Sub

if not IsDate(StrTimeSet) then
Msgbox(“Wakti Tidak Valid”)
me.lblInfo.caption=vbNullString
else

‘masukkan valid, set strTimeSet
strTimeSet=CDate(strTImeSet)
‘misal mengabaikan waktu telah lewat
if time >strTimeSet then
msgbox (“Waktu Sudah Lewat”)
Else
lblInfo.caption=”Alarm:”&strTimeSet
End if
End if
End SUb

Private cmdUnset_Click()
strTimeSet=vbNullString
me.lblInfo.caption=vbNullString
End SUb

Private Sub tmr_Timer()
static blnGO as integer
if lblTime.Caption <> CStr(Time) then
If Time=strTimeSet And Not blnGO then
‘simulasi bunyi alarm
Beep
me.lblInfo.caption=vbNullString
msgbox (“Alarm berbunyi(” & Time & “)”)
blnGO=True
ElsIf Time <strTimeSet Then
blnGO=False
End if
End if
me.lblTime.caption=Time
end sub

One response to “Alarm Scheduler

  1. Pingback: Recent Links Tagged With "scheduler" - JabberTags

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s