home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{918CCC70-61EE-11D2-8D50-0000B456D8CA}#3.0#0"; "DynaCdPlayerX.ocx"
- Begin VB.Form Form1
- Caption = "DynaCd VB5 example"
- ClientHeight = 5160
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 7995
- LinkTopic = "Form1"
- ScaleHeight = 5160
- ScaleWidth = 7995
- StartUpPosition = 2 'CenterScreen
- Begin VB.CommandButton Command12
- Caption = "Quit"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 510
- Left = 6420
- TabIndex = 39
- Top = 4530
- Width = 1455
- End
- Begin VB.Frame Frame2
- Caption = "CD data"
- Height = 4410
- Left = 2880
- TabIndex = 16
- Top = 0
- Width = 5010
- Begin VB.Label Label20
- BorderStyle = 1 'Fixed Single
- Caption = "Label20"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 3360
- TabIndex = 48
- Top = 2955
- Width = 1440
- End
- Begin VB.Label Label19
- BorderStyle = 1 'Fixed Single
- Caption = "Label19"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 1845
- TabIndex = 47
- Top = 2955
- Width = 1440
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Position Left"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Index = 12
- Left = 180
- TabIndex = 46
- Top = 2955
- Width = 1665
- End
- Begin VB.Label Label18
- BorderStyle = 1 'Fixed Single
- Caption = "Label18"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 3360
- TabIndex = 45
- Top = 2610
- Width = 1440
- End
- Begin VB.Label Label17
- BorderStyle = 1 'Fixed Single
- Caption = "Label17"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 3360
- TabIndex = 44
- Top = 2265
- Width = 1440
- End
- Begin VB.Label Label16
- BorderStyle = 1 'Fixed Single
- Caption = "Label16"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 3360
- TabIndex = 43
- Top = 1245
- Width = 1560
- End
- Begin VB.Label Label15
- BorderStyle = 1 'Fixed Single
- Caption = "Label15"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 1845
- TabIndex = 42
- Top = 4005
- Width = 1440
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Cddb Disc ID"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Index = 11
- Left = 180
- TabIndex = 41
- Top = 4005
- Width = 1665
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Previous State"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Index = 10
- Left = 180
- TabIndex = 36
- Top = 600
- Width = 1665
- End
- Begin VB.Label Label14
- BorderStyle = 1 'Fixed Single
- Caption = "Label14"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 270
- Left = 1845
- TabIndex = 35
- Top = 600
- Width = 1440
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Current State"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Index = 0
- Left = 180
- TabIndex = 34
- Top = 240
- Width = 1665
- End
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- Caption = "Nb Tracks"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 180
- TabIndex = 33
- Top = 885
- Width = 1665
- End
- Begin VB.Label Label3
- BorderStyle = 1 'Fixed Single
- Caption = "Label3"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 1845
- TabIndex = 32
- Top = 240
- Width = 1440
- End
- Begin VB.Label Label4
- BorderStyle = 1 'Fixed Single
- Caption = "Label4"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 1845
- TabIndex = 31
- Top = 885
- Width = 1440
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Current Track"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Index = 2
- Left = 180
- TabIndex = 30
- Top = 1575
- Width = 1665
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Previous Track"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Index = 3
- Left = 180
- TabIndex = 29
- Top = 1920
- Width = 1665
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Track Length"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Index = 4
- Left = 180
- TabIndex = 28
- Top = 2265
- Width = 1665
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Start Position"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Index = 5
- Left = 180
- TabIndex = 27
- Top = 3315
- Width = 1665
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "End Position"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Index = 6
- Left = 180
- TabIndex = 26
- Top = 3660
- Width = 1665
- End
- Begin VB.Label Label5
- BorderStyle = 1 'Fixed Single
- Caption = "Label5"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 1845
- TabIndex = 25
- Top = 1575
- Width = 1440
- End
- Begin VB.Label Label7
- BorderStyle = 1 'Fixed Single
- Caption = "Label7"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 1845
- TabIndex = 24
- Top = 1920
- Width = 1440
- End
- Begin VB.Label Label8
- BorderStyle = 1 'Fixed Single
- Caption = "Label8"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 1845
- TabIndex = 23
- Top = 2265
- Width = 1440
- End
- Begin VB.Label Label9
- BorderStyle = 1 'Fixed Single
- Caption = "Label9"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 1845
- TabIndex = 22
- Top = 3315
- Width = 1440
- End
- Begin VB.Label Label10
- BorderStyle = 1 'Fixed Single
- Caption = "Label10"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 1845
- TabIndex = 21
- Top = 3660
- Width = 1440
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Total Time"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Index = 8
- Left = 180
- TabIndex = 20
- Top = 1230
- Width = 1665
- End
- Begin VB.Label Label12
- BorderStyle = 1 'Fixed Single
- Caption = "Label12"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 1845
- TabIndex = 19
- Top = 1230
- Width = 1440
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Track Position"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Index = 9
- Left = 180
- TabIndex = 18
- Top = 2610
- Width = 1665
- End
- Begin VB.Label Label13
- BorderStyle = 1 'Fixed Single
- Caption = "Label13"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 1845
- TabIndex = 17
- Top = 2610
- Width = 1440
- End
- End
- Begin DynaCDPlayerX.DynaCD DynaCD1
- Height = 600
- Left = 480
- Top = 3360
- Width = 600
- _ExtentX = 1058
- _ExtentY = 1058
- End
- Begin VB.CommandButton Command6
- Caption = "Cls"
- Height = 555
- Left = 5970
- TabIndex = 2
- Top = 4500
- Width = 375
- End
- Begin VB.Frame Frame1
- Caption = "CD Command"
- Height = 4410
- Left = 60
- TabIndex = 5
- Top = 0
- Width = 2820
- Begin VB.CommandButton Command13
- Caption = "Pause"
- Height = 405
- Left = 1410
- TabIndex = 40
- Top = 1125
- Width = 585
- End
- Begin VB.TextBox Text1
- Height = 285
- Left = 150
- TabIndex = 38
- Text = "set cdaudio audio all off"
- Top = 2940
- Width = 2460
- End
- Begin VB.CommandButton Command11
- Caption = "Send String Command"
- Height = 315
- Left = 150
- TabIndex = 37
- Top = 2610
- Width = 2460
- End
- Begin VB.CommandButton Command1
- Caption = "Init DynaCD"
- Height = 330
- Left = 150
- TabIndex = 15
- Top = 285
- Width = 1185
- End
- Begin VB.CommandButton Command2
- Caption = "Close DynaCD"
- Height = 330
- Left = 150
- TabIndex = 14
- Top = 630
- Width = 1185
- End
- Begin VB.CommandButton Command3
- Caption = "Play"
- Height = 405
- Left = 150
- TabIndex = 13
- Top = 1125
- Width = 1185
- End
- Begin VB.CommandButton Command4
- Caption = "Stop"
- Height = 405
- Left = 2010
- TabIndex = 12
- Top = 1125
- Width = 585
- End
- Begin VB.CommandButton Command7
- Caption = "Open Cd Door"
- Height = 330
- Left = 1410
- TabIndex = 11
- Top = 285
- Width = 1200
- End
- Begin VB.CommandButton Command8
- Caption = "Close Cd Door"
- Height = 330
- Left = 1410
- TabIndex = 10
- Top = 630
- Width = 1200
- End
- Begin VB.CommandButton Command5
- Caption = "<< Prev Track"
- Height = 435
- Left = 150
- TabIndex = 9
- Top = 1575
- Width = 1185
- End
- Begin VB.CommandButton Command9
- Caption = "Next Track >>"
- Height = 435
- Left = 1410
- TabIndex = 8
- Top = 1575
- Width = 1185
- End
- Begin VB.CommandButton Command10
- Caption = "Goto Track"
- Height = 435
- Left = 150
- TabIndex = 7
- Top = 2070
- Width = 1185
- End
- Begin VB.ComboBox Combo1
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 420
- Left = 1410
- TabIndex = 6
- Text = "Combo1"
- Top = 2085
- Width = 1200
- End
- End
- Begin VB.Label Label11
- BorderStyle = 1 'Fixed Single
- Height = 270
- Left = 1245
- TabIndex = 4
- Top = 4485
- Width = 4725
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Error Code"
- Height = 270
- Index = 7
- Left = 105
- TabIndex = 3
- Top = 4500
- Width = 1125
- End
- Begin VB.Label Label6
- BorderStyle = 1 'Fixed Single
- Height = 270
- Left = 1245
- TabIndex = 1
- Top = 4770
- Width = 4725
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Error Event"
- Height = 270
- Index = 1
- Left = 105
- TabIndex = 0
- Top = 4770
- Width = 1125
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim i As Integer
- Private Sub Command1_Click()
- DynaCD1.User_Name = ""
- DynaCD1.User_Password = 0
- If DynaCD1.DynaCD_Init(10) = 0 Then Exit Sub
- Label3.Caption = DynaCD1.CD_State
- Label5.Caption = DynaCD1.Current_Track
- Combo1.Clear
- For i = 1 To DynaCD1.Total_CdTracks
- Combo1.AddItem i
- Next i
- If Combo1.ListCount > 0 Then Combo1.ListIndex = 0
- End Sub
- Private Sub Command10_Click()
- If DynaCD1.DynaCD_GotoTrack(Val(Combo1.Text)) = 0 Then
- MsgBox "Return error"
- End If
- End Sub
- Private Sub Command11_Click()
- If Text1.Text = "" Then Exit Sub
- If DynaCD1.DynaCD_SendString(Text1.Text) = 0 Then MsgBox "Return Error"
- ' If DynaCD1.DynaCD_SendString("set cdaudio audio all off") = 0 Then MsgBox "Return Error"
- End Sub
- Private Sub Command12_Click()
- Unload Me
- End Sub
- Private Sub Command13_Click()
- If DynaCD1.DynaCD_PauseTrack = 0 Then MsgBox "Return Error"
- End Sub
- Private Sub Command2_Click()
- DynaCD1.DynaCD_Close
- Label3.Caption = DynaCD1.CD_State
- End Sub
- Private Sub Command3_Click()
- If DynaCD1.DynaCD_PlayTrack = 0 Then MsgBox "Return Error"
- End Sub
- Private Sub Command4_Click()
- If DynaCD1.DynaCD_StopTrack = 0 Then MsgBox "Return Error"
- End Sub
- Private Sub Command5_Click()
- If DynaCD1.DynaCD_PrevTrack = 0 Then MsgBox "Return Error"
- End Sub
- Private Sub Command6_Click()
- Label6.Caption = ""
- Label11.Caption = ""
- End Sub
- Private Sub Command7_Click()
- If DynaCD1.DynaCD_OpenDoor = 0 Then MsgBox "Return error"
- End Sub
- Private Sub Command8_Click()
- If DynaCD1.DynaCD_CloseDoor = 0 Then MsgBox "Return error"
- End Sub
- Private Sub Command9_Click()
- DynaCD1.DynaCD_NextTrack
- End Sub
- Private Sub DynaCD1_CdError(ErrorCode As Long, ErrorString As String)
- Label6.Caption = ErrorString
- Label11.Caption = ErrorCode
- End Sub
- Private Sub DynaCD1_CdMediaChanged()
- Label15.Caption = DynaCD1.Cddb_Id
- Label12.Caption = DynaCD1.Total_CdTime
- Label16.Caption = DynaCD1.Total_CdTimeHMS
- Label4.Caption = DynaCD1.Total_CdTracks
- End Sub
- Private Sub DynaCD1_CdPositionChanged()
- Label13.Caption = DynaCD1.Current_TrackPosition
- Label18.Caption = DynaCD1.Current_TrackPositionHMS
- Label19.Caption = DynaCD1.Current_TrackPositionLeft
- Label20.Caption = DynaCD1.Current_TrackPositionLeftHMS
- End Sub
- Private Sub DynaCD1_CdStateChanged(NewState As String, OldState As String)
- Label3.Caption = NewState
- Label14.Caption = OldState
- End Sub
- Private Sub DynaCD1_CdTrackChanged()
- Label5.Caption = DynaCD1.Current_Track
- Label7.Caption = DynaCD1.Previous_TrackPlayed
- Label8.Caption = DynaCD1.Current_TrackLength
- Label17.Caption = DynaCD1.Current_TrackLengthHMS
- Label9.Caption = DynaCD1.Current_TrackStart
- Label10.Caption = DynaCD1.Current_TrackEnd
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- DynaCD1.DynaCD_Close
- End Sub
-