home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmVCR
- BackColor = &H00000000&
- Caption = "VBTV"
- ClientHeight = 6795
- ClientLeft = 1170
- ClientTop = 1545
- ClientWidth = 7110
- FillStyle = 0 'Solid
- Icon = "vcr.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 6795
- ScaleWidth = 7110
- Begin VB.CommandButton cmdSet
- Caption = "
- Height = 360
- Left = 4560
- MaskColor = &H00000000&
- TabIndex = 13
- ToolTipText = "
- Top = 6000
- Width = 1095
- End
- Begin VB.Timer tmr2
- Enabled = 0 'False
- Left = 6240
- Top = 3240
- End
- Begin VB.Timer tmr1
- Interval = 65535
- Left = 6240
- Top = 2640
- End
- Begin VB.CommandButton cmdDown
- Caption = "-"
- Height = 325
- Left = 6120
- MaskColor = &H00000000&
- TabIndex = 11
- ToolTipText = "
- Top = 1440
- Width = 735
- End
- Begin VB.CommandButton cmdUp
- Caption = "+"
- Height = 325
- Left = 6120
- MaskColor = &H00000000&
- TabIndex = 10
- ToolTipText = "
- Top = 1080
- Width = 735
- End
- Begin VB.CommandButton cmdExit
- Cancel = -1 'True
- Caption = "
- Height = 360
- Left = 5760
- MaskColor = &H00000000&
- TabIndex = 7
- ToolTipText = "
- VBTV"
- Top = 6000
- Width = 1095
- End
- Begin VB.CommandButton cmdPause
- Caption = "ll"
- Enabled = 0 'False
- BeginProperty Font
- Name = "Arial"
- Size = 14.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 360
- Left = 1005
- MaskColor = &H00000000&
- TabIndex = 6
- ToolTipText = "
- Top = 6000
- Width = 615
- End
- Begin VB.CommandButton cmdRec
- Caption = "
- Height = 360
- Left = 1650
- MaskColor = &H00000000&
- TabIndex = 5
- ToolTipText = "
- Top = 6000
- Width = 615
- End
- Begin VB.CommandButton cmdForward
- Caption = ">>"
- BeginProperty Font
- Name = "
- Size = 13.5
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 360
- Left = 2940
- MaskColor = &H00000000&
- TabIndex = 4
- ToolTipText = "
- Top = 6000
- Width = 615
- End
- Begin VB.CommandButton cmdRewind
- Caption = "<<"
- BeginProperty Font
- Name = "
- Size = 13.5
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 360
- Left = 2295
- MaskColor = &H00000000&
- TabIndex = 3
- ToolTipText = "
- Top = 6000
- Width = 615
- End
- Begin VB.CommandButton cmdStop
- Caption = "
- Enabled = 0 'False
- Height = 360
- Left = 3585
- MaskColor = &H00000000&
- TabIndex = 2
- ToolTipText = "
- Top = 6000
- Width = 615
- End
- Begin VB.PictureBox picTV
- AutoRedraw = -1 'True
- BackColor = &H00C0C0C0&
- BorderStyle = 0 'None
- FillStyle = 2 'Horizontal Line
- BeginProperty Font
- Name = "
- Size = 18
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00FFFFFF&
- Height = 4215
- Left = 360
- ScaleHeight = 4215
- ScaleWidth = 5535
- TabIndex = 1
- Top = 240
- Width = 5535
- End
- Begin VB.CommandButton cmdPlay
- Caption = ">"
- BeginProperty Font
- Name = "
- Size = 13.5
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 360
- Left = 360
- MaskColor = &H00000000&
- TabIndex = 0
- ToolTipText = "
- Top = 6000
- Width = 615
- End
- Begin VB.Line Line2
- BorderColor = &H00808080&
- X1 = 0
- X2 = 7080
- Y1 = 4660
- Y2 = 4660
- End
- Begin VB.Line Line1
- BorderColor = &H00FFFFFF&
- X1 = 0
- X2 = 7080
- Y1 = 4700
- Y2 = 4700
- End
- Begin VB.Shape shpPlay
- FillColor = &H0000FF00&
- FillStyle = 0 'Solid
- Height = 105
- Left = 615
- Shape = 3 'Circle
- Top = 5835
- Visible = 0 'False
- Width = 105
- End
- Begin VB.Shape shpForward
- FillColor = &H0000FF00&
- FillStyle = 0 'Solid
- Height = 105
- Left = 3210
- Shape = 3 'Circle
- Top = 5835
- Visible = 0 'False
- Width = 105
- End
- Begin VB.Shape shpRewind
- FillColor = &H0000FF00&
- FillStyle = 0 'Solid
- Height = 105
- Left = 2565
- Shape = 3 'Circle
- Top = 5835
- Visible = 0 'False
- Width = 105
- End
- Begin VB.Shape shpRec
- FillColor = &H000000FF&
- FillStyle = 0 'Solid
- Height = 105
- Left = 1905
- Shape = 3 'Circle
- Top = 5835
- Visible = 0 'False
- Width = 105
- End
- Begin VB.Shape shpPause
- FillColor = &H0000FF00&
- FillStyle = 0 'Solid
- Height = 105
- Left = 1260
- Shape = 3 'Circle
- Top = 5835
- Visible = 0 'False
- Width = 105
- End
- Begin VB.Image img2
- Height = 1155
- Left = 1680
- Picture = "vcr.frx":0442
- Top = 6720
- Visible = 0 'False
- Width = 1155
- End
- Begin VB.Image img1
- Height = 1155
- Left = 240
- Picture = "vcr.frx":10CC
- Top = 6720
- Visible = 0 'False
- Width = 1155
- End
- Begin VB.Label lblTime
- Alignment = 2 'Center
- BackColor = &H00000000&
- BorderStyle = 1 'Fixed Single
- BeginProperty Font
- Name = "
- Size = 18
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H000000FF&
- Height = 615
- Left = 480
- TabIndex = 12
- Top = 4920
- Width = 1935
- End
- Begin VB.Label lblBrand
- BackStyle = 0 'Transparent
- Caption = "Microsoft Visual Basic VCR - Version 1.0"
- ForeColor = &H00FFFFFF&
- Height = 375
- Left = 3360
- TabIndex = 9
- Top = 5100
- Width = 2895
- End
- Begin VB.Image imgTapeSlot
- BorderStyle = 1 'Fixed Single
- Height = 735
- Left = 2640
- Top = 4920
- Width = 4215
- End
- Begin VB.Label lblChannel
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- BorderStyle = 1 'Fixed Single
- Caption = "3"
- BeginProperty Font
- Name = "
- Size = 24
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H0000FF00&
- Height = 615
- Left = 6120
- TabIndex = 8
- ToolTipText = "
- Top = 240
- Width = 735
- End
- Attribute VB_Name = "frmVCR"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '**********************************************
- VCR
- Visual Basic
- '**********************************************
- Option Explicit
- Tape
- Dim Tape As New clsTape
- Dim vntChannel As Variant '
- ' QBColor
- Const vcrBlack = 0
- Const vcrGreen = 2
- Const vcrCyan = 3
- Const vcrRed = 4
- Const vcrMagenta = 5
- Const vcrYellow = 6
- Const vcrWhite = 7
- Const vcrGray = 8
- Const vcrLightBlue = 9
- Const vcrLightGreen = 10
- Const vcrLightCyan = 11
- Const vcrLightRed = 12
- Const vcrLightMagenta = 13
- Private Sub cmdDown_Click()
- '
- If vntChannel > 2 Then
- vntChannel = vntChannel - 1
- Else
- vntChannel = 13
- End If
- '
- lblChannel.Caption = vntChannel
- End Sub
- Private Sub cmdExit_Click()
- '
- Unload Me
- Set frmVCR = Nothing
- End Sub
- Private Sub cmdForward_Click()
- '
- SaveChannel vntChannel
- '
- vntChannel = 3
- lblChannel.Caption = vntChannel
- '
- Tape
- Tape.Forward = True
- Tape.Speed = 50
- '
- tmr2.Enabled = True
- tmr2.Interval = Tape.Speed
- '
- ButtonManager frmVCR.cmdForward
- End Sub
- Private Sub cmdPause_Click()
- '
- tmr2.Enabled = False
- '
- ButtonManager frmVCR.cmdPause
- End Sub
- Private Sub cmdPlay_Click()
- '
- SaveChannel vntChannel
- '
- vntChannel = 3
- lblChannel.Caption = vntChannel
- '
- Tape
- Tape.Forward = True
- Tape.Speed = 300
- '
- tmr2.Enabled = True
- tmr2.Interval = Tape.Speed
- '
- ButtonManager frmVCR.cmdPlay
- End Sub
- Private Sub cmdRec_Click()
- Dim strStatus As String '
- '
- SaveChannel vntChannel
- '
- picTV.Cls
- '
- strStatus = "
- " & vntChannel & "
- picTV.Print strStatus
- strStatus = lblTime.Caption
- picTV.Print strStatus
- '
- ButtonManager frmVCR.cmdRec
- End Sub
- Private Sub cmdRewind_Click()
- '
- SaveChannel vntChannel
- '
- vntChannel = 3
- lblChannel.Caption = vntChannel
- '
- Tape
- Tape.Forward = False
- Tape.Speed = 50
- '
- tmr2.Enabled = True
- tmr2.Interval = Tape.Speed
- '
- ButtonManager frmVCR.cmdRewind
- End Sub
- Private Sub cmdSet_Click()
- '
- frmSetTime.Show vbModal
- End Sub
- Private Sub cmdStop_Click()
- Dim intChannel As Integer '
- '
- tmr2.Enabled = False
- '
- ButtonManager frmVCR.cmdStop
- '
- picTV.Cls
- '
- intChannel = SaveChannel(0)
- vntChannel = intChannel
- lblChannel.Caption = vntChannel
- End Sub
- Private Sub cmdUp_Click()
- '
- If vntChannel < 13 Then
- vntChannel = vntChannel + 1
- Else
- vntChannel = 2
- End If
- '
- lblChannel.Caption = vntChannel
- End Sub
- Private Sub Form_Load()
- '
- lblTime.Caption = Format((Now), "h:mm AM/PM")
- '
- frmVCR.Height = 6990
- img1.Visible = True
- '
- Me.Show
- '
- vntChannel = 3
- lblChannel.Caption = vntChannel
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- '
- Set Tape = Nothing
- Set Recorder = Nothing
- Set frmVCR = Nothing
- End Sub
- Private Sub lblChannel_Change()
- '
- Select Case vntChannel
- Case 2
- picTV.BackColor = QBColor(vcrGreen)
- Case 3
- picTV.BackColor = QBColor(vcrWhite)
- Case 4
- picTV.BackColor = QBColor(vcrRed)
- Case 5
- picTV.BackColor = QBColor(vcrMagenta)
- Case 6
- picTV.BackColor = QBColor(vcrYellow)
- Case 7
- picTV.BackColor = QBColor(vcrCyan)
- Case 8
- picTV.BackColor = QBColor(vcrGray)
- Case 9
- picTV.BackColor = QBColor(vcrLightBlue)
- Case 10
- picTV.BackColor = QBColor(vcrLightGreen)
- Case 11
- picTV.BackColor = QBColor(vcrLightCyan)
- Case 12
- picTV.BackColor = QBColor(vcrLightRed)
- Case 13
- picTV.BackColor = QBColor(vcrLightMagenta)
- End Select
- '
- picTV.Cls
- '
- picTV.Print "
- " & vntChannel
- picTV.Print lblTime.Caption
- End Sub
- Private Sub tmr1_Timer()
- '
- lblTime.Caption = Format((Now), "h:mm AM/PM")
- '
- Recorder
- If Recorder.Enabled = True Then
- '
- If Recorder.StartRecording = lblTime.Caption Then
- '
- vntChannel = Recorder.Channel
- lblChannel.Caption = vntChannel
- '
- cmdRec.Value = True
- '
- Recorder
- Recorder.StartRecording = Empty
- End If
- Else
- '
- If Recorder.StopRecording = lblTime.Caption Then
- '
- cmdStop.Value = True
- '
- Recorder
- Recorder.StopRecording = Empty
- End If
- End If
- End Sub
- Private Sub tmr2_Timer()
- Dim intWidth As Integer 'Width
- Dim intLeft As Integer 'Left
- Dim objImage As Control 'Image
- '
- intWidth = picTV.Width
- '
- Tape
- '
- Tape.Animate intWidth
- '
- Left
- intLeft = Tape.Left
- '
- If img1.Visible = True Then
- img1.Visible = False
- Set objImage = img2
- Else
- img1.Visible = True
- Set objImage = img1
- End If
- '
- picTV.Cls
- '
- picTV.PaintPicture objImage.Picture, intLeft, 1200
- End Sub
-