home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{F6FEA32D-63C9-11D0-BB11-444553540000}#4.0#0"; "ALARM.ocx"
- Begin VB.Form Form1
- BackColor = &H00808080&
- Caption = "Alarm Control Demo"
- ClientHeight = 2265
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 3960
- LinkTopic = "Form1"
- ScaleHeight = 2265
- ScaleWidth = 3960
- StartUpPosition = 3 'Windows Default
- Begin ALARM.AlarmCtl AlarmCtl1
- Height = 495
- Left = 1035
- TabIndex = 2
- Top = 345
- Width = 1800
- _ExtentX = 3175
- _ExtentY = 873
- CountDown = -1 'True
- AlarmTime = 0.875
- End
- Begin VB.CommandButton AlarmButton
- Caption = "Alarm Time"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 450
- Left = 1020
- TabIndex = 0
- Top = 1530
- Width = 1905
- End
- Begin VB.CommandButton StartButton
- Caption = "Start Timer"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 435
- Left = 1020
- TabIndex = 1
- ToolTipText = "aa"
- Top = 990
- Width = 1905
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub AlarmCtl1_TimeOut()
- MsgBox "The Alarm has Timed out", , "ALARM CONTROL"
- End Sub
- Private Sub StartButton_Click()
- If StartButton.Caption = "Start Timer" Then
- AlarmCtl1.StartTimer
- StartButton.Caption = "Stop Timer"
- Else
- StartButton.Caption = "Start Timer"
- AlarmCtl1.StopTimer
- End If
- End Sub
- Private Sub AlarmButton_Click()
- If AlarmCtl1.CountDown Then
- MsgBox "The alarm is ticking..."
- Else
- MsgBox "The alarm will go off at " & AlarmCtl1.AlarmTime
- End If
- End Sub
-