SLAlarm is an ActiveX component that lets you set multiple
alarms, that goes off at various times and dates. This general alarm
control makes it easy to schedule events.
deactivates the alarm control. If this property has the value
False no alarm events will be fired. If this property has
the value True
alarm events will be fired if there is a match between the
current date and time and the scheduled date and time.
||If this property has
the value True, only the time of an added alarm will be
used - the date part will be ignored. If this property has the
False both date and time must match before an alarm event
will be fired.
||This event occurs
when the alarm date and time is the same as current date and
ID parameter contains the alarm
identifier of the fired alarm.
Add (DateTime As Date, ID As
Integer) As Boolean
Adds time and date to the internal list of scheduled
alarms. The date/time is specified by the
DateTime parameter. The ID
parameter can be used to set a unique identifier for an alarm
and can be used in the Alarm event
to identify the alarm.
Removes all added date and times from the alarm
The example below add two alarm times to the
control. Both date and time
must be correct before an alarm event can be fired. When the condition
is true, the alarm is fired via the Alarm event.
Dim DT As Date
' Time 1
DT = "2009-07-28 19:00"
' Time 2
SLAlarm1.IgnoreDate = False
SLAlarm1_Alarm(ByVal ID As Integer)
MsgBox "Alarm number: " + CStr(ID), 0, "Alarm"
< Go back