home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmSetTime
- BorderStyle = 3 'Fixed Dialog
- Caption = "
- ClientHeight = 2760
- ClientLeft = 780
- ClientTop = 1590
- ClientWidth = 5175
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2760
- ScaleWidth = 5175
- ShowInTaskbar = 0 'False
- Begin VB.CommandButton cmdCancel
- Cancel = -1 'True
- Caption = "
- Height = 495
- Left = 3360
- MaskColor = &H00000000&
- TabIndex = 7
- Top = 1200
- Width = 1215
- End
- Begin VB.CommandButton cmdOK
- Caption = "
- Default = -1 'True
- Height = 495
- Left = 3360
- MaskColor = &H00000000&
- TabIndex = 6
- Top = 480
- Width = 1215
- End
- Begin VB.TextBox txtChannel
- Height = 375
- Left = 1200
- TabIndex = 5
- Text = "3"
- ToolTipText = "
- Top = 1920
- Width = 615
- End
- Begin VB.TextBox txtEnd
- Height = 375
- Left = 1200
- TabIndex = 4
- Text = "12:30 AM"
- ToolTipText = "
- Top = 1200
- Width = 1215
- End
- Begin VB.TextBox txtStart
- Height = 375
- Left = 1200
- TabIndex = 3
- Text = "12:00 AM"
- ToolTipText = "
- Top = 480
- Width = 1215
- End
- Begin VB.Label lblCaption
- Alignment = 1 'Right Justify
- Caption = "
- Height = 255
- Index = 2
- Left = 0
- TabIndex = 2
- Top = 2040
- Width = 1095
- End
- Begin VB.Label lblCaption
- Alignment = 1 'Right Justify
- Caption = "
- Height = 255
- Index = 1
- Left = 0
- TabIndex = 1
- Top = 1320
- Width = 1095
- End
- Begin VB.Label lblCaption
- Alignment = 1 'Right Justify
- Caption = "
- Height = 255
- Index = 0
- Left = 0
- TabIndex = 0
- Top = 600
- Width = 1095
- End
- Attribute VB_Name = "frmSetTime"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '**********************************************
- '
- '
- VCR
- '**********************************************
- Option Explicit
- Private Sub cmdCancel_Click()
- '
- Unload Me
- Set frmSetTime = Nothing
- End Sub
- Private Sub cmdOK_Click()
- Dim intOK As Integer '
- Dim intChannel As Integer '
- Dim strMsg As String '
- '
- intOK = ValidateTime(txtStart.Text, txtStart)
- '
- If intOK = False Then Exit Sub
-
- '
- intOK = ValidateTime(txtEnd.Text, txtEnd)
- '
- If intOK = False Then Exit Sub
- '
- intChannel = Val(txtChannel)
- '
- If intChannel < 2 Or intChannel > 13 Then
- strMsg = "
- MsgBox strMsg, vbOKOnly, "
- txtChannel.SetFocus
- Exit Sub
- End If
- '
- Recorder
- Recorder.StartRecording = CVar(txtStart.Text)
- Recorder.StopRecording = CVar(txtEnd.Text)
- Recorder.Channel = intChannel
-
- '
- Unload Me
- Set frmSetTime = Nothing
- End Sub
- Private Sub Form_Load()
- '
- '
- TextBox
- If Recorder.StartRecording <> Empty Then
- txtStart.Text = Recorder.StartRecording
- End If
- If Recorder.StopRecording <> Empty Then
- txtEnd.Text = Recorder.StopRecording
- End If
- txtChannel = Recorder.Channel
- End Sub
- '**********************************************
- '
- '
- Time
- ' Field
- True -
- ' False -
- '**********************************************
- Function ValidateTime(Time As String, Field As Control) As Boolean
- Dim strMsg As String '
- '
- IsDate
- If IsDate(Time) Then
- '
- True
- Field.Text = Format$(Time, "h:mm AM/PM")
- ValidateTime = True
- Else
- '
- strMsg = "
- strMsg = strMsg & "(
- AM/PM)"
- MsgBox strMsg, vbOKOnly, "
- '
- Field.SetFocus
- '
- False
- ValidateTime = False
- End If
- End Function
- Private Sub txtChannel_GotFocus()
- '
- txtChannel.SelStart = 0
- txtChannel.SelLength = Len(txtChannel.Text)
- End Sub
- Private Sub txtChannel_KeyPress(KeyAscii As Integer)
- '
- IsNumeric
- If Not IsNumeric(Chr(KeyAscii)) Then
- '
- null
- KeyAscii = 0
- End If
- End Sub
- Private Sub txtEnd_GotFocus()
- '
- txtEnd.SelStart = 0
- txtEnd.SelLength = Len(txtEnd.Text)
- End Sub
- Private Sub txtEnd_LostFocus()
- Dim intOK As Integer '
- '
- intOK = ValidateTime(txtEnd.Text, txtEnd)
- End Sub
- Private Sub txtStart_GotFocus()
- '
- txtStart.SelStart = 0
- txtStart.SelLength = Len(txtStart.Text)
- End Sub
- Private Sub txtStart_LostFocus()
- Dim intOK As Integer '
- '
- intOK = ValidateTime(txtStart.Text, txtStart)
- End Sub
-