VERSION 5.00
Object = "{6BF52A50-394A-11D3-B153-00C04F79FAA6}#1.0#0"; "wmp.dll"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "ComDlg32.ocx"
Begin VB.Form Form1 
   BackColor       =   &H8000000E&
   Caption         =   "Rista Media Player 2.6"
   ClientHeight    =   11235
   ClientLeft      =   120
   ClientTop       =   450
   ClientWidth     =   14835
   FillColor       =   &H0000C000&
   ForeColor       =   &H8000000D&
   Icon            =   "form1.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   11235
   ScaleWidth      =   14835
   StartUpPosition =   3  'Windows Default
   Begin VB.FileListBox FileList 
      ForeColor       =   &H8000000D&
      Height          =   1650
      Left            =   11760
      Pattern         =   $"form1.frx":015E
      TabIndex        =   45
      Top             =   1080
      Width           =   2655
   End
   Begin VB.CommandButton cmdPlsi 
      BackColor       =   &H8000000E&
      Caption         =   "Play Simultenously"
      Height          =   375
      Left            =   1680
      MaskColor       =   &H00FF8080&
      TabIndex        =   43
      ToolTipText     =   "Full Screen"
      Top             =   9600
      Width           =   1695
   End
   Begin VB.PictureBox cmdPause 
      BackColor       =   &H8000000E&
      FillColor       =   &H00FF8080&
      ForeColor       =   &H0000C000&
      Height          =   495
      Left            =   480
      Picture         =   "form1.frx":0261
      ScaleHeight     =   435
      ScaleWidth      =   435
      TabIndex        =   42
      ToolTipText     =   "Pause"
      Top             =   7680
      Width           =   495
   End
   Begin VB.CommandButton cmdOriginal 
      BackColor       =   &H8000000E&
      Caption         =   "Original"
      Height          =   375
      Left            =   2520
      MaskColor       =   &H00FF8080&
      TabIndex        =   41
      ToolTipText     =   "Original Screen"
      Top             =   10200
      Width           =   855
   End
   Begin VB.PictureBox cmdUnMute 
      BackColor       =   &H8000000E&
      FillColor       =   &H00FF8080&
      ForeColor       =   &H00008000&
      Height          =   495
      Index           =   0
      Left            =   3840
      Picture         =   "form1.frx":05ED
      ScaleHeight     =   435
      ScaleWidth      =   435
      TabIndex        =   40
      ToolTipText     =   "Un Mute"
      Top             =   7680
      Width           =   495
   End
   Begin VB.TextBox pfname 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000006&
      Height          =   375
      Left            =   3720
      TabIndex        =   39
      Top             =   9600
      Width           =   4095
   End
   Begin VB.ComboBox cmbFileType 
      ForeColor       =   &H8000000D&
      Height          =   315
      ItemData        =   "form1.frx":0AB5
      Left            =   12240
      List            =   "form1.frx":0B4F
      TabIndex        =   38
      Tag             =   "Type Of Media Files"
      ToolTipText     =   "Type Of Media Files"
      Top             =   6600
      Width           =   2295
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   120
      Top             =   9720
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
      Color           =   65280
   End
   Begin VB.TextBox Text4 
      ForeColor       =   &H8000000D&
      Height          =   375
      Left            =   960
      TabIndex        =   37
      Top             =   9000
      Width           =   1935
   End
   Begin VB.CommandButton cmdRev 
      BackColor       =   &H8000000E&
      Caption         =   "<<"
      BeginProperty Font 
         Name            =   "MS Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5160
      MaskColor       =   &H0080FF80&
      TabIndex        =   35
      ToolTipText     =   "Fast Reverse"
      Top             =   7680
      Width           =   495
   End
   Begin VB.CommandButton cmdFast 
      BackColor       =   &H8000000E&
      Caption         =   ">>"
      BeginProperty Font 
         Name            =   "MS Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   4680
      MaskColor       =   &H0080FF80&
      TabIndex        =   34
      ToolTipText     =   "Fast Forward"
      Top             =   7680
      Width           =   495
   End
   Begin VB.CommandButton cmdBack 
      BackColor       =   &H8000000E&
      Caption         =   "<"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   1440
      MaskColor       =   &H00FFFF80&
      TabIndex        =   33
      ToolTipText     =   "Previous"
      Top             =   7680
      Width           =   375
   End
   Begin VB.CommandButton cmdNext 
      BackColor       =   &H8000000E&
      Caption         =   ">"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   4320
      MaskColor       =   &H00FFFF80&
      TabIndex        =   32
      ToolTipText     =   "Next"
      Top             =   7680
      Width           =   375
   End
   Begin VB.CommandButton cmdRepeat 
      BackColor       =   &H8000000E&
      Caption         =   "Repeat"
      Height          =   375
      Left            =   3480
      MaskColor       =   &H00FF8080&
      TabIndex        =   31
      ToolTipText     =   "Repeat"
      Top             =   10200
      Width           =   855
   End
   Begin VB.CommandButton cmdSmallScreen 
      BackColor       =   &H8000000E&
      Caption         =   "Small "
      Height          =   375
      Left            =   1680
      MaskColor       =   &H00FF8080&
      TabIndex        =   30
      ToolTipText     =   "Small Screen"
      Top             =   10200
      Width           =   855
   End
   Begin VB.CommandButton cmdMedium 
      BackColor       =   &H8000000E&
      Caption         =   "Medium"
      Height          =   375
      Left            =   840
      MaskColor       =   &H00FF8080&
      TabIndex        =   29
      ToolTipText     =   "Midium Screen"
      Top             =   10200
      Width           =   855
   End
   Begin VB.CommandButton cmdFullScreen 
      BackColor       =   &H8000000E&
      Caption         =   "Full"
      Height          =   375
      Left            =   120
      MaskColor       =   &H00FF8080&
      TabIndex        =   28
      ToolTipText     =   "Full Screen"
      Top             =   10200
      Width           =   735
   End
   Begin VB.CommandButton cmdGenerate 
      Caption         =   "Generate"
      Height          =   375
      Left            =   8640
      TabIndex        =   24
      Top             =   9960
      Width           =   1095
   End
   Begin VB.TextBox PLName 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000006&
      Height          =   375
      Left            =   6120
      TabIndex        =   23
      Top             =   9000
      Width           =   3495
   End
   Begin VB.Timer Timer2 
      Left            =   120
      Top             =   10560
   End
   Begin VB.CommandButton cmdOpen 
      Caption         =   "Open"
      Height          =   375
      Left            =   8640
      MaskColor       =   &H0000FF00&
      TabIndex        =   21
      Top             =   9480
      Width           =   1095
   End
   Begin VB.ListBox PlayList1 
      ForeColor       =   &H8000000D&
      Height          =   2790
      Left            =   11040
      TabIndex        =   14
      Top             =   8160
      Width           =   3375
   End
   Begin VB.PictureBox cmdMute 
      BackColor       =   &H8000000E&
      FillColor       =   &H00FF8080&
      ForeColor       =   &H00008000&
      Height          =   495
      Index           =   1
      Left            =   3360
      Picture         =   "form1.frx":0CB7
      ScaleHeight     =   435
      ScaleWidth      =   435
      TabIndex        =   13
      ToolTipText     =   "Mute"
      Top             =   7680
      Width           =   495
   End
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   600
      Top             =   10560
   End
   Begin VB.TextBox Text3 
      ForeColor       =   &H00008000&
      Height          =   285
      Left            =   6240
      TabIndex        =   6
      Top             =   10800
      Width           =   1575
   End
   Begin VB.TextBox Text2 
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   285
      Left            =   6240
      TabIndex        =   5
      Top             =   10440
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H8000000E&
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   285
      Left            =   6240
      TabIndex        =   4
      Top             =   10080
      Width           =   1575
   End
   Begin VB.DriveListBox Drives 
      BackColor       =   &H8000000E&
      ForeColor       =   &H00008000&
      Height          =   315
      Left            =   12240
      TabIndex        =   3
      Top             =   5640
      Width           =   2295
   End
   Begin VB.DirListBox Folders 
      BackColor       =   &H8000000E&
      BeginProperty Font 
         Name            =   "Lucida Console"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   1560
      Left            =   12240
      TabIndex        =   2
      Top             =   3720
      Width           =   2295
   End
   Begin VB.PictureBox cmdPlay 
      FillColor       =   &H00C0FFC0&
      ForeColor       =   &H8000000D&
      Height          =   495
      Left            =   120
      Picture         =   "form1.frx":1327
      ScaleHeight     =   435
      ScaleWidth      =   435
      TabIndex        =   1
      ToolTipText     =   "Play"
      Top             =   7680
      Width           =   495
   End
   Begin VB.PictureBox cmdStop 
      BackColor       =   &H8000000E&
      FillColor       =   &H00FF8080&
      ForeColor       =   &H0000C000&
      Height          =   495
      Left            =   960
      Picture         =   "form1.frx":16B3
      ScaleHeight     =   435
      ScaleWidth      =   435
      TabIndex        =   0
      ToolTipText     =   "Stop"
      Top             =   7680
      Width           =   495
   End
   Begin WMPLibCtl.WindowsMediaPlayer MPlayer1 
      Height          =   8055
      Left            =   120
      TabIndex        =   12
      Top             =   120
      Width           =   10815
      URL             =   ""
      rate            =   1
      balance         =   0
      currentPosition =   0
      defaultFrame    =   ""
      playCount       =   1
      autoStart       =   -1  'True
      currentMarker   =   0
      invokeURLs      =   -1  'True
      baseURL         =   ""
      volume          =   50
      mute            =   0   'False
      uiMode          =   "full"
      stretchToFit    =   0   'False
      windowlessVideo =   0   'False
      enabled         =   -1  'True
      enableContextMenu=   -1  'True
      fullScreen      =   0   'False
      SAMIStyle       =   ""
      SAMILang        =   ""
      SAMIFilename    =   ""
      captioningID    =   ""
      enableErrorDialogs=   0   'False
      _cx             =   19076
      _cy             =   14208
   End
   Begin VB.Label cmdResize 
      Alignment       =   2  'Center
      BackColor       =   &H8000000E&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "1"
      BeginProperty Font 
         Name            =   "Webdings"
         Size            =   8.25
         Charset         =   2
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   375
      Left            =   1080
      TabIndex        =   47
      Top             =   9720
      Width           =   375
   End
   Begin VB.Label cmdMinimize 
      Alignment       =   2  'Center
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "_"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   375
      Left            =   600
      TabIndex        =   46
      ToolTipText     =   "Minimize"
      Top             =   9720
      Width           =   375
   End
   Begin VB.Label Label7 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "File Types"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   255
      Left            =   12240
      TabIndex        =   44
      Top             =   6120
      Width           =   2295
   End
   Begin VB.Label lblStatus 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Status="
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   375
      Left            =   240
      TabIndex        =   36
      Top             =   9000
      Width           =   615
   End
   Begin VB.Label Label6 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Drive"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   255
      Left            =   12240
      TabIndex        =   27
      Top             =   5280
      Width           =   2295
   End
   Begin VB.Label Label5 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Folder"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   255
      Left            =   12360
      TabIndex        =   26
      Top             =   3360
      Width           =   1935
   End
   Begin VB.Label Label4 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "<<==File List==>>"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   255
      Left            =   12360
      TabIndex        =   25
      Top             =   360
      Width           =   1935
   End
   Begin VB.Label cmdPLLoad 
      BackColor       =   &H00FFFFFF&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Click To Load Play List File Name (*.wpl)=  "
      BeginProperty Font 
         Name            =   "MS Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   315
      Left            =   3120
      TabIndex        =   22
      Top             =   9000
      Width           =   2895
   End
   Begin VB.Label cmdSaveList 
      BackColor       =   &H8000000E&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Save List"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   375
      Left            =   9960
      TabIndex        =   20
      ToolTipText     =   "Save Play List"
      Top             =   10440
      Width           =   975
   End
   Begin VB.Label cmdLoadList 
      BackColor       =   &H8000000E&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Load List"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF00FF&
      Height          =   375
      Left            =   9960
      TabIndex        =   19
      ToolTipText     =   "Load Play List"
      Top             =   9960
      Width           =   975
   End
   Begin VB.Label cmdNewList 
      BackColor       =   &H8000000E&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "New List"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   375
      Left            =   9960
      TabIndex        =   18
      ToolTipText     =   "Make New List"
      Top             =   9480
      Width           =   975
   End
   Begin VB.Label cmdRemove 
      BackColor       =   &H8000000E&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Remove"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   375
      Left            =   9960
      TabIndex        =   17
      ToolTipText     =   "Remove Play Item"
      Top             =   9000
      Width           =   975
   End
   Begin VB.Label cmdAdd 
      BackColor       =   &H8000000E&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "    Add"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   375
      Left            =   9960
      TabIndex        =   16
      ToolTipText     =   "Add Play Item"
      Top             =   8520
      Width           =   975
   End
   Begin VB.Label lblPlayList 
      BackColor       =   &H8000000E&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "==== P L A Y    L I S T===="
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   375
      Left            =   11280
      TabIndex        =   15
      Top             =   7440
      Width           =   2895
   End
   Begin VB.Label Label3 
      BackColor       =   &H80000005&
      Caption         =   "Current Position :"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   255
      Left            =   4560
      TabIndex        =   11
      Top             =   10800
      Width           =   1575
   End
   Begin VB.Label Label2 
      BackColor       =   &H80000005&
      Caption         =   "Total Time :"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   255
      Left            =   4560
      TabIndex        =   10
      Top             =   10440
      Width           =   1095
   End
   Begin VB.Label Label1 
      BackColor       =   &H80000005&
      Caption         =   "Current Time:"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   255
      Left            =   4560
      TabIndex        =   9
      Top             =   10080
      Width           =   1335
   End
   Begin VB.Label cmdChangeBackground 
      Alignment       =   2  'Center
      BackColor       =   &H8000000E&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Back Coluor Change"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   375
      Left            =   1080
      TabIndex        =   8
      ToolTipText     =   "Change Background Colour"
      Top             =   10560
      Width           =   2295
   End
   Begin VB.Label cmdExit 
      Alignment       =   2  'Center
      BackColor       =   &H8000000E&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Exit"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   375
      Left            =   3480
      TabIndex        =   7
      ToolTipText     =   "Exit Media Player"
      Top             =   10560
      Width           =   855
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Rista Media Player 2.6
'by Asis Kumar Goswami maild id akgbest77@yahoo.com
Dim StopPeriod, BeginPeriod, stor, MinutesRemain, SecondsRemain As Integer
Dim drvname, flname, foldname As String
Dim d, le, minutes, seconds As Integer
Dim mute As Boolean
Dim i, c As Integer
Dim prd(10) As String
Dim j As Integer
Dim id As Integer
Dim che As Integer

Private Sub cmdAdd_Click()

Dim sfile As String
With CommonDialog1
    .CancelError = False
    .Filter = "Media Playlist(*.asx;*.m3u;*.wpl;*.wvx;*.wmx)|*.asx;*.m3u;*.wpl;*.wvx;*.wmx|Microsoft Recorded TV Show (*.drv-ms;*.wtv)|*.drv-ms;*.wtv|MIDI file (*.mid;*.rmi;*.midi)|*.mid;*.rmi;*.midi|Movie file (*.mpeg;*.mpg;*.m4a;*.mod;*.m2v;*.m1v;*.mpa;*.mpe;*.ifo;*.vob)|*.mpeg;*.mpg;*.mod;*.m2v;*.m1v;*.mpa;*.mpe;*.ifo;*.vob|MP4 Audio file (*.m4a)|*.m4a|MP4 Video file (*.mp4;*.m4v;*.3gp;*.3gpp;*.3g2;*.3gp2)|*.mp4;*.m4v;*.3gp;*.3gpp;*.3g2;*.3gp2|MPEG-2 TS Video file (*.m2ts;*.m2t;*.mts;*.ts;*.tts)| *.m2ts;*.m2t;*.mts;*.ts;*.tts|QuickTime Movie file (*.mov)|*.mov|Windows audio file (wav)(*.wav;*.snd;*.au;*.aif;*.aifc;*.wma;*.mp2;*.mp3)|*.wav;*.snd;*.au;*.aif;*.aifc;*.wma;*.mp2;*.mp3|Windows Media file (asf) (*.asf;*.wm;*.wma;*.wmv;*.wmd)|*.asf;*.wm;*.wma;*.wmv;*.wmd|Windows picture file (jpg) (*.jpg;*.jpeg)|*.jpg;*.jpeg|Windows video file (avi) (*.avi;*.wmv)|*.avi;*.wmv|All File (*.*)|*.*|"
    .ShowOpen
    If .FileName = "" Then
    Exit Sub
    End If
End With
    sfile = CommonDialog1.FileName
    CommonDialog1.FileName = ""
    PlayList1.AddItem sfile
    sfile = ""

End Sub

Private Sub cmdBack_Click()
Timer1.Enabled = True
On Error GoTo moo
    Dim spret As String
    lasttrack = lasttrack - 1
    spre = PlayList1.List(lasttrack)
    PlayList1.ListIndex = PlayList1.ListIndex - 1
    MPlayer1.URL = snext
    MPlayer1.Controls.play
    Text2.Text = ""
    Text1.Text = ""
moo:
lasttrack = PlayList1.ListIndex
 plays = ""
    Timer1.Enabled = True
    pfname = PlayList1.Text
'MPlayer1.Controls.previous
End Sub

Private Sub cmdChangeBackground_Click()
CommonDialog1.ShowColor
Me.BackColor = CommonDialog1.Color
Label1.BackColor = CommonDialog1.Color
Label2.BackColor = CommonDialog1.Color
Label3.BackColor = CommonDialog1.Color
End Sub

Private Sub cmdExit_Click()
Timer1.Enabled = False
VB.Unload Me
End
End Sub

Private Sub cmdFast_Click()
MPlayer1.Controls.fastForward
End Sub

Private Sub cmdFullScreen_Click()
'Appactive "MPlayer1"
MPlayer1.Height = 14000
MPlayer1.Width = 18000

'Picture1.Visible = False
'Picture2.Visible = False
'Picture3.Visible = False
FileList.Visible = False
Folders.Visible = False
Drives.Visible = False
cmbFileType.Visible = False
cmdAdd.Visible = False
cmdRemove.Visible = False
cmdRepeat.Visible = False
cmdNewList.Visible = False
cmdLoadList.Visible = False
cmdSaveList.Visible = False
PlayList1.Visible = False
lblPlayList.Visible = False
lblStatus.Visible = False
pfname.Visible = False
cmdPLLoad.Visible = False
cmdMinimize.Visible = False
cmdResize.Visible = False
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
Text1.Visible = False
cmdPlsi.Visible = False
Text2.Visible = False
cmdOpen.Visible = False
cmdMedium.Visible = False
cmdSmallScreen.Visible = False
cmdGenerate.Visible = False
pfname.Visible = False
Text3.Visible = False
Text4.Visible = False
'lblPs.Visible = False
Label1.Visible = False
Label2.Visible = False
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
Label6.Visible = False
Label7.Visible = False
cmdOriginal.Visible = True
cmdPlay.Visible = False
cmdNext.Visible = False
cmdBack.Visible = False
cmdStop.Visible = False
cmdPause.Visible = False
cmdFast.Visible = False
cmdRev.Visible = False

'cmdPause.Visible = False
cmdStop.Visible = False
cmdMinimize.Visible = False
cmdFullScreen.Visible = False
cmdResize.Visible = False

End Sub

Private Sub cmdGenerate_Click()
Dim rec As String
Open "Pl1.txt" For Input As #1
Open "PlayList1.txt" For Input As #2
Open "pl3.txt" For Input As #3
Open "PlayList1.wpl" For Output As #4
Do While Not EOF(1)
Line Input #1, rec
Print #4, rec
Loop
Do While Not EOF(2)
Line Input #2, rec
Print #4, "<media src=" + rec + "/>"
Loop
Do While Not EOF(3)
Line Input #3, rec
Print #4, rec
Loop
Close #1
Close #2
Close #3
Close #4

End Sub


Private Sub cmdMinimize_Click()
If Me.WindowState <> 1 Then Me.WindowState = 1
End Sub

Private Sub cmdMedium_Click()
MPlayer1.Height = 6000
MPlayer1.Width = 8000
End Sub

Private Sub cmdOriginal_Click()

MPlayer1.Height = 5055
MPlayer1.Width = 5535
FileList.Visible = True
Drives.Visible = True
Folders.Visible = True
cmdAdd.Visible = True
lblPlayList.Visible = True
cmdRemove.Visible = True
cmdRepeat.Visible = True
cmdNewList.Visible = True
cmdLoadList.Visible = True
cmdSaveList.Visible = True
PlayList1.Visible = True
Label3.Visible = True
Label4.Visible = True
Label5.Visible = True
Text1.Visible = True
Text2.Visible = True
Text3.Visible = True
cmdPlsi.Visible = True
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label4.Visible = True
Label5.Visible = True
Label6.Visible = True
Label7.Visible = True
pfname.Visible = True
cmdPlsi.Visible = True
cmdOriginal.Visible = True
cmdPLLoad.Visible = True
lblStatus.Visible = True
cmdMinimize.Visible = True
cmdResize.Visible = True
cmdChangeBackground.Visible = True
cmdExit.Visible = True
cmdPlay.Visible = True
cmdNext.Visible = True
cmdBack.Visible = True
cmdPause.Visible = True
cmdFast.Visible = True
cmdRev.Visible = True
cmdStop.Visible = True
cmdFullScreen.Visible = True
cmdOpen.Visible = True
cmdGenerate.Visible = True
cmdMedium.Visible = True
cmdSmallScreen.Visible = True


End Sub



Private Sub cmdMute_Click(Index As Integer)
MPlayer1.settings.volume = 0
End Sub

Private Sub cmdPause_Click()
Timer1.Enabled = False
MPlayer1.Controls.pause
End Sub

Private Sub cmdPLLoad_Click()
CommonDialog1.Filter = "Default|PlayList1.wpl|Media Playlist(*.asx;*.m3u;*.wpl;*.wvx;*.wmx)|*.asx;*.m3u;*.wpl;*.wvx;*.wmx|"
CommonDialog1.ShowOpen
PLName.Text = CommonDialog1.FileName
MPlayer1.URL = CommonDialog1.FileName
End Sub

Private Sub cmdPlsi_Click()
Dim plc, pllc As Integer
plc = PlayList1.ListCount
If PlayList1.ListCount = 0 Then
Exit Sub
Else
PlayList1.ListIndex = 0
For pllc = 1 To plc
MPlayer1.URL = (PlayList1.List(pllc))
MPlayer1.Controls.play
If MPlayer1.playState = wmppsMediaEnded Then
10 End If
20 Next pllc
30 End If
End Sub

Private Sub cmdRepeat_Click()

MPlayer1.Controls.play
Text1.Text = ""
Text2.Text = ""
minutes = 0
i = 0
SecondsRemain = 0
BeginPeriod = 0
seconds = 0
MinutesRemain = 0
StopPeriod = 0
Timer1.Enabled = True
cmdRepeat.Enabled = False
End Sub

Private Sub cmdResize_Click()
If Form1.Height = Form1.Width >= 5715 Then
     Form1.Height = 2800
     Form1.Width = 2800
   ElseIf Form1.Height = Form1.Width <= 2085 Then
      Form1.Height = 5715
      Form1.Width = 5715
   End If
 
End Sub

Private Sub cmdRev_Click()
MPlayer1.Controls.fastReverse
End Sub

Private Sub cmdSmallScreen_Click()
MPlayer1.Height = 3000
MPlayer1.Width = 4000
End Sub



Private Sub cmdUnMute_Click(Index As Integer)
MPlayer1.settings.volume = 100
End Sub

Private Sub Drives_Change()
Folders.Path = Left$(Drives.Drive, 1) & ":\"
End Sub


Private Sub FileList_Click()
Timer1.Enabled = True
FileName = FileList.Path
If Right$(FileName, 1) <> "\" Then FileName = FileName & "\"
FileName = FileName & FileList.FileName
MPlayer1.URL = FileName
End Sub

Private Sub Folders_Change()
FileList.Path = Folders.Path
End Sub

Private Sub Form1_Load()
cmdOriginal.Visible = False
Timer1.Enabled = False
che = 0
End Sub


Private Sub cmdLoadList_Click()
Dim sfile As String
With CommonDialog1
    .CancelError = False
    .Filter = "*.txt"
    .ShowOpen
    If .FileName = "" Then
    Exit Sub
    End If
    sfile = CommonDialog1.FileName
    CommonDialog1.FileName = ""
End With
    PlayList1.Clear
Dim a As String
Dim x As String
On Error GoTo error
Open sfile For Input As #1
Do Until EOF(1)
Input #1, a$
PlayList1.AddItem a$
Loop
Close 1
sfile = ""
Exit Sub
error:
x = MsgBox("File Not Found", vbOKOnly, "Error")
End Sub

Private Sub cmdNewList_Click()
    PlayList1.Clear
End Sub

Private Sub cmdNext_Click()
Timer1.Enabled = False
On Error GoTo soo
    Dim snext As String
    lasttrack = lasttrack + 1
    snext = PlayList1.List(lasttrack)
    PlayList1.ListIndex = PlayList1.ListIndex + 1
    MPlayer1.FileName = snext
    MPlayer1.play
    Text2.Text = ""
    Text1.Text = ""
soo:
lasttrack = PlayList1.ListIndex
 plays = ""
    Timer1.Enabled = True
    pfname = PlayList1.Text
End Sub

Private Sub cmdOpen_Click()
Timer1.Enabled = False
Dim sfile As String
With CommonDialog1
    .CancelError = False
    .Filter = "Media Playlist(*.asx;*.m3u;*.wpl;*.wvx;*.wmx)|*.asx;*.m3u;*.wpl;*.wvx;*.wmx|Microsoft Recorded TV Show (*.drv-ms;*.wtv)|*.drv-ms;*.wtv|MIDI file (*.mid;*.rmi;*.midi)|*.mid;*.rmi;*.midi|Movie file (*.mpeg;*.mpg;*.mod;*.m2v;*.m1v;*.mpa;*.mpe;*.ifo;*.vob)|*.mpeg;*.mpg;*.mod;*.m2v;*.m1v;*.mpa;*.mpe;*.ifo;*.vob|MP4 Audio file (*.m4a)|*.m4a|MP4 Video file (*.mp4;*.m4v;*.3gp;*.3gpp;*.3g2;*.3gp2)|*.mp4;*.m4v;*.3gp;*.3gpp;*.3g2;*.3gp2|MPEG-2 TS Video file (*.m2ts;*.m2t;*.mts;*.ts;*.tts)| *.m2ts;*.m2t;*.mts;*.ts;*.tts|QuickTime Movie file (*.mov)|*.mov|Windows audio file (wav)(*.wav;*.snd;*.au;*.aif;*.aifc;*.wma;*.mp2;*.mp3)|*.wav;*.snd;*.au;*.aif;*.aifc;*.wma;*.mp2;*.mp3|Windows Media file (asf) (*.asf;*.wm;*.wma;*.wmv;*.wmd)|*.asf;*.wm;*.wma;*.wmv;*.wmd|Windows picture file (jpg) (*.jpg;*.jpeg)|*.jpg;*.jpeg|Windows video file (avi) (*.avi;*.wmv)|*.avi;*.wmv|All File (*.*)|*.*|"
    .ShowOpen
End With
    If CommonDialog1.FileName = "" Then
    Exit Sub
    End If
    Timer1.Enabled = True
cmdRepeat.Enabled = False
    sfile = CommonDialog1.FileName
    CommonDialog1.FileName = ""
   PlayList1.Clear
    PlayList1.AddItem sfile
    sfile = ""
    PlayList1.ListIndex = 0
    Timer1.Enabled = True
    cmdRepeat.Enabled = False
    Text2.Text = ""
    Text1.Text = ""
End Sub



Private Sub cmdplay_Click()
Timer1.Enabled = True
On Error Resume Next
    MPlayer1.URL = PlayList1.Text
    play.play
    plays = ""
    Slider1.Max = play.duration
    pfname = PlayList1.Text
    Timer1.Enabled = False
    
End Sub


Private Sub cmdPrevious_Click()
Timer1.Enabled = False
    Dim spev As String
If lasttrack < 1 Then
Exit Sub
End If
    lasttrack = lasttrack - 1
    spev = PlayList1.List(lasttrack)
    PlayList1.ListIndex = PlayList1.ListIndex - 1
    MPlayer1.FileName = spev
    MPlayer1.play
    plays = ""
    Text1.Text = ""
    Text2.Text = ""
minutes = 0
i = 0
SecondsRemain = 0
BeginPeriod = 0
seconds = 0
MinutesRemain = 0
StartPeriod = 0
Timer1.Enabled = True
cmdRepeat.Enabled = False
cmdNext.Enabled = True

    pfname = PlayList1.Text
End Sub

Private Sub cmdRemove_Click()

    If PlayList1.ListIndex = -1 Then
Else
    PlayList1.RemoveItem PlayList1.ListIndex
End If

End Sub

Private Sub cmdSaveList_Click()
  Dim i As Long
    Dim sfile As String
With CommonDialog1
    .CancelError = False
    .Filter = "Text File (*.txt)|*.txt|"
    .ShowOpen
    If .FileName = "" Then
    Exit Sub
    End If
End With
    sfile = CommonDialog1.FileName
    CommonDialog1.FileName = ""
    On Error GoTo error
    Open sfile For Output As #1
For i = 0 To 100
    PlayList1.ListIndex = i
     Write #1, PlayList1.Text
Next i
error:
    Close #1
End Sub

Private Sub cmdStop_Click()
Timer1.Enabled = False
MPlayer1.Controls.stop
Text1.Text = " "
Text2.Text = ""
End Sub


Private Sub lblPs_Click()
If PlayList1.ListCount = 0 Then

Exit Sub
Else
PlayList1.ListIndex = 0
MPlayer1.URL = (PlayList1.List(0))

End If

End Sub


Private Sub PlayList1_Click()
Timer1.Enabled = True
    MPlayer1.URL = PlayList1.Text
    MPlayer1.Controls.play
    lasttrack = PlayList1.ListIndex
    pfname = PlayList1.Text
End Sub
Private Sub MPlayer1_EndOfStream(ByVal Result As Long)
MPlayer1.Controls.stop
Timer1.Enabled = False
cmdRepeat.Enabled = True
Text1.Text = ""
Text2.Text = ""
c = c + 1
If Form1.PlayList1.ListIndex < 0 Then
Exit Sub
MPlayer1.playCount = 10
Else
 MPlayer1.Open (Form1.PlayList1.List(c))
 End If
End Sub

Private Sub Timer1_Timer()
SecondsRemain = SecondsRemain + 1

 If i < 1 Then
 On Error Resume Next
  d = MPlayer1.currentMedia.duration
    
    For le = 1 To 5
        StopPeriod = Mid(d, le, 1)
        If StopPeriod = "." Then
         Exit For
        End If
        BeginPeriod = BeginPeriod & StopPeriod
     Next
     stor = BeginPeriod
     For le = 1 To 80
        If BeginPeriod < 60 Then
        seconds = BeginPeriod
        Exit For
        End If
        BeginPeriod = BeginPeriod - 60
       minutes = minutes + 1
    Next
   
    If minutes < 1 Then
    Text2.Text = "0" & " : " & seconds
    Else
    Text2.Text = mimutes & " : " & seconds
    End If
    minutes = 0
 End If
          
    If stor = i Then
    Timer1.Enabled = False
    End If
    If SecondsRemain = 60 Then
    SecondsRemain = 0
    MinutesRemain = MinutesRemain + 1
    End If
    If MinutesRemain = 0 Then
         Text1.Text = "0" & " : " & SecondsRemain
    Else
         Text1.Text = MinutesRemain & " : " & SecondsRemain
    End If
    
    Text4.Text = MPlayer1.Status
 i = i + 1
 
End Sub






