home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form w_clock_demo
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "ctClock (Clock Control) Demo"
- ClientHeight = 5520
- ClientLeft = 1200
- ClientTop = 1335
- ClientWidth = 9165
- Height = 5925
- Icon = "ct_clock.frx":0000
- Left = 1140
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MDIChild = -1 'True
- MinButton = 0 'False
- ScaleHeight = 5520
- ScaleWidth = 9165
- Top = 990
- Width = 9285
- Begin VB.Frame Frame1
- Caption = "Clock Type"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 1005
- Left = 360
- TabIndex = 11
- Top = 4050
- Width = 1635
- Begin VB.OptionButton Option2
- Caption = "Analog"
- Height = 285
- Left = 180
- TabIndex = 13
- Top = 630
- Width = 1155
- End
- Begin VB.OptionButton Option1
- Caption = "Digital"
- Height = 285
- Left = 180
- TabIndex = 12
- Top = 270
- Value = -1 'True
- Width = 1155
- End
- End
- Begin VB.CheckBox Check3
- Caption = "Include AM/PM"
- Height = 285
- Left = 3240
- TabIndex = 10
- Top = 3510
- Value = 1 'Checked
- Width = 1755
- End
- Begin VB.CheckBox Check2
- Caption = "Include Seconds"
- Height = 285
- Left = 3240
- TabIndex = 9
- Top = 3150
- Value = 1 'Checked
- Width = 1695
- End
- Begin VB.CheckBox Check1
- Caption = "Military Time"
- Height = 285
- Left = 3240
- TabIndex = 8
- Top = 2790
- Width = 1275
- End
- Begin VB.CommandButton Command2
- Caption = "Set Alarm"
- Height = 375
- Left = 3240
- TabIndex = 7
- Top = 1710
- Width = 1695
- End
- Begin VB.CommandButton Command1
- Caption = "E&xit"
- Height = 465
- Left = 3600
- TabIndex = 1
- Top = 4770
- Width = 1095
- End
- Begin VB.Label Label3
- Alignment = 2 'Center
- Caption = "Set the alarm for three seconds from now."
- Height = 465
- Left = 3300
- TabIndex = 6
- Top = 1170
- Width = 1575
- End
- Begin VB.Label lbl_time
- Alignment = 2 'Center
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- Caption = "1:50"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 12
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 6480
- TabIndex = 5
- Top = 3960
- Width = 1155
- End
- Begin VB.Label Label2
- Alignment = 2 'Center
- Caption = $"ct_clock.frx":030A
- ForeColor = &H00800000&
- Height = 825
- Left = 4980
- TabIndex = 4
- Top = 4500
- Width = 3975
- End
- Begin ClockLib.ctClock ctClock2
- Height = 2895
- Left = 5460
- TabIndex = 3
- Top = 900
- Width = 3135
- _version = 65536
- _extentx = 5530
- _extenty = 5106
- _stockprops = 68
- BeginProperty font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Times New Roman"
- charset = 0
- weight = 700
- size = 14.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- backcolor = 12632256
- forecolor = 128
- hourcolor = 8388608
- minutecolor = 16711680
- clocktype = 1
- bordertype = 1
- timetype = 1
- numberoffset = 10
- currenthour = 1
- currentminute = 50
- includeseconds = 0 'False
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Caption = $"ct_clock.frx":03E5
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00800000&
- Height = 645
- Left = 180
- TabIndex = 2
- Top = 90
- Width = 8715
- End
- Begin ClockLib.ctClock ctClock1
- Height = 2715
- Left = 300
- TabIndex = 0
- Top = 1080
- Width = 2775
- _version = 65536
- _extentx = 4895
- _extenty = 4789
- _stockprops = 68
- BeginProperty font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Arial"
- charset = 0
- weight = 400
- size = 18
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- backcolor = 12648447
- secondcolor = 255
- bordertype = 3
- numberoffset = 7
- currenthour = 18
- currentminute = 16
- currentsecond = 4
- End
- Attribute VB_Name = "w_clock_demo"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Private Sub Check1_Click()
- ctClock1.MilitaryTime = Check1.Value
- End Sub
- Private Sub Check2_Click()
- ctClock1.IncludeSeconds = Check2.Value
- End Sub
- Private Sub Check3_Click()
- ctClock1.IncludeAmPm = Check3.Value
- End Sub
- Private Sub Command1_Click()
- Unload w_clock_demo
- End Sub
- Private Sub Command2_Click()
- ctClock1.AlarmHour = ctClock1.CurrentHour
- ctClock1.AlarmMinute = ctClock1.CurrentMinute
- ctClock1.AlarmSecond = ctClock1.CurrentSecond + 3
- If (ctClock1.CurrentSecond + 3 >= 60) Then
- ctClock1.AlarmMinute = ctClock1.CurrentMinute + 1
- End If
- End Sub
- Private Sub ctClock2_TimeChange(nHour As Integer, nMinute As Integer, nSecond As Integer)
- Dim cTime As String
- If nHour = 0 Then
- cTime = "12" + ":"
- Else
- cTime = Str(nHour) + ":"
- End If
- If (nMinute < 10) Then
- cTime = cTime + "0"
- End If
- lbl_time.Caption = cTime + LTrim(Str(nMinute))
- End Sub
- Private Sub Form_Load()
- ' Center the window on the screen
- Move (Screen.Width - Width) / 2, (Screen.Height - Height) * 0.15
- End Sub
- Private Sub Option1_Click()
- ctClock1.ClockType = 0
- ctClock1.FontSize = 18
- End Sub
- Private Sub Option2_Click()
- ctClock1.ClockType = 1
- ctClock1.FontSize = 8
- End Sub
-