Form1.frm

 VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{899348F9-A53A-4D9E-9438-F97F0E81E2DB}#1.0#0"; "lvbuttons.ocx"
Object = "{31F31FD4-05F4-4ABA-A6BF-1BB2CDE7A169}#1.0#0"; "volumeControl.ocx"
Object = "{22D6F304-B0F6-11D0-94AB-0080C74C7E95}#1.0#0"; "msdxm.ocx"
Begin VB.Form Form1
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Blast Player ii"
   ClientHeight    =   2175
   ClientLeft      =   3735
   ClientTop       =   4275
   ClientWidth     =   8535
   Icon            =   "Form1.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MouseIcon       =   "Form1.frx":08CA
   ScaleHeight     =   2175
   ScaleWidth      =   8535
   Begin MSComctlLib.ImageList ImgPic
      Left            =   360
      Top             =   7200
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
         NumListImages   =   5
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "Form1.frx":0BD4
            Key             =   "Open "
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "Form1.frx":14AE
            Key             =   "Close"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "Form1.frx":1A08
            Key             =   "Play"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "Form1.frx":2A5A
            Key             =   "Stop"
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
            Picture         =   "Form1.frx":3AAC
            Key             =   "Pause"
         EndProperty
      EndProperty
   End
   Begin LVbuttons.LaVolpeButton cmdexit
      Height          =   375
      Left            =   360
      TabIndex        =   15
      Top             =   360
      Width           =   615
      _ExtentX        =   1085
      _ExtentY        =   661
      BTYPE           =   8
      TX              =   ""
      ENAB            =   -1  'True
      BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851}
         Name            =   "Times New Roman"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      COLTYPE         =   1
      BCOL            =   14215660
      FCOL            =   0
      FCOLO           =   0
      EMBOSSM         =   12632256
      EMBOSSS         =   16777215
      MPTR            =   0
      MICON           =   "Form1.frx":4AFE
      ALIGN           =   1
      IMGLST          =   "ImgPic"
      IMGICON         =   "2"
      ICONAlign       =   0
      ORIENT          =   0
      STYLE           =   0
      IconSize        =   1
      SHOWF           =   -1  'True
      BSTYLE          =   0
   End
   Begin LVbuttons.LaVolpeButton cmdopen
      Height          =   375
      Left            =   1440
      TabIndex        =   14
      Top             =   1440
      Width           =   615
      _ExtentX        =   1085
      _ExtentY        =   661
      BTYPE           =   8
      TX              =   ""
      ENAB            =   -1  'True
      BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851}
         Name            =   "Times New Roman"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      COLTYPE         =   1
      BCOL            =   14215660
      FCOL            =   0
      FCOLO           =   0
      EMBOSSM         =   12632256
      EMBOSSS         =   16777215
      MPTR            =   0
      MICON           =   "Form1.frx":4B1A
      ALIGN           =   1
      IMGLST          =   "ImgPic"
      IMGICON         =   "1"
      ICONAlign       =   0
      ORIENT          =   0
      STYLE           =   0
      IconSize        =   3
      SHOWF           =   -1  'True
      BSTYLE          =   0
   End
   Begin LVbuttons.LaVolpeButton cmdstop
      Height          =   375
      Left            =   7680
      TabIndex        =   13
      Top             =   360
      Width           =   495
      _ExtentX        =   873
      _ExtentY        =   661
      BTYPE           =   3
      TX              =   ""
      ENAB            =   -1  'True
      BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851}
         Name            =   "Times New Roman"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      COLTYPE         =   1
      BCOL            =   14215660
      FCOL            =   0
      FCOLO           =   0
      EMBOSSM         =   12632256
      EMBOSSS         =   16777215
      MPTR            =   0
      MICON           =   "Form1.frx":4B36
      ALIGN           =   1
      IMGLST          =   "ImgPic"
      IMGICON         =   "4"
      ICONAlign       =   0
      ORIENT          =   0
      STYLE           =   0
      IconSize        =   1
      SHOWF           =   -1  'True
      BSTYLE          =   0
   End
   Begin LVbuttons.LaVolpeButton cmdpause
      Height          =   375
      Left            =   7080
      TabIndex        =   12
      Top             =   360
      Width           =   615
      _ExtentX        =   1085
      _ExtentY        =   661
      BTYPE           =   3
      TX              =   "P"
      ENAB            =   -1  'True
      BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851}
         Name            =   "Times New Roman"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      COLTYPE         =   2
      BCOL            =   14215660
      FCOL            =   0
      FCOLO           =   0
      EMBOSSM         =   12632256
      EMBOSSS         =   16777215
      MPTR            =   0
      MICON           =   "Form1.frx":4B52
      ALIGN           =   1
      IMGLST          =   "ImgPic"
      IMGICON         =   "5"
      ICONAlign       =   0
      ORIENT          =   0
      STYLE           =   1
      IconSize        =   2
      SHOWF           =   -1  'True
      BSTYLE          =   0
   End
   Begin LVbuttons.LaVolpeButton cmdplay
      Height          =   375
      Left            =   6480
      TabIndex        =   11
      Top             =   360
      Width           =   615
      _ExtentX        =   1085
      _ExtentY        =   661
      BTYPE           =   3
      TX              =   ""
      ENAB            =   -1  'True
      BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851}
         Name            =   "Times New Roman"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      COLTYPE         =   1
      BCOL            =   14215660
      FCOL            =   0
      FCOLO           =   0
      EMBOSSM         =   12632256
      EMBOSSS         =   16777215
      MPTR            =   0
      MICON           =   "Form1.frx":4B6E
      ALIGN           =   1
      IMGLST          =   "ImgPic"
      IMGICON         =   "3"
      ICONAlign       =   0
      ORIENT          =   0
      STYLE           =   0
      IconSize        =   1
      SHOWF           =   -1  'True
      BSTYLE          =   0
   End
   Begin VB.Timer Timer1
      Left            =   0
      Top             =   6720
   End
   Begin VB.PictureBox Picture1
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BeginProperty Font
         Name            =   "Arial"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   255
      Left            =   6480
      ScaleHeight     =   225
      ScaleWidth      =   1665
      TabIndex        =   8
      Top             =   0
      Width           =   1695
   End
   Begin VB.CheckBox chkmute
      Appearance      =   0  'Flat
      BackColor       =   &H80000016&
      Caption         =   "Mute"
      ForeColor       =   &H80000008&
      Height          =   255
      Left            =   1200
      TabIndex        =   7
      Top             =   480
      Width           =   735
   End
   Begin MSComctlLib.Slider duration
      Height          =   255
      Left            =   2280
      TabIndex        =   6
      Top             =   1320
      Width           =   3975
      _ExtentX        =   7011
      _ExtentY        =   450
      _Version        =   393216
      LargeChange     =   1
      Max             =   100
      TickStyle       =   3
   End
   Begin VB.Timer SongTime
      Left            =   480
      Top             =   6720
   End
   Begin VB.HScrollBar HScroll1
      Height          =   255
      Left            =   6480
      Max             =   128
      TabIndex        =   1
      Top             =   1320
      Value           =   30
      Width           =   1695
   End
   Begin VB.ListBox List2
      Height          =   645
      Left            =   3000
      TabIndex        =   4
      Top             =   6480
      Width           =   2655
   End
   Begin VB.ListBox List1
      BackColor       =   &H80000007&
      BeginProperty Font
         Name            =   "Arial"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0080FF80&
      Height          =   1185
      Left            =   2400
      TabIndex        =   0
      ToolTipText     =   "Songs list"
      Top             =   120
      Width           =   3735
   End
   Begin MediaPlayerCtl.MediaPlayer Mplayer
      Height          =   615
      Left            =   1440
      TabIndex        =   16
      Top             =   6960
      Width           =   735
      AudioStream     =   -1
      AutoSize        =   0   'False
      AutoStart       =   -1  'True
      AnimationAtStart=   -1  'True
      AllowScan       =   -1  'True
      AllowChangeDisplaySize=   -1  'True
      AutoRewind      =   0   'False
      Balance         =   0
      BaseURL         =   ""
      BufferingTime   =   5
      CaptioningID    =   ""
      ClickToPlay     =   -1  'True
      CursorType      =   0
      CurrentPosition =   -1
      CurrentMarker   =   0
      DefaultFrame    =   ""
      DisplayBackColor=   0
      DisplayForeColor=   16777215
      DisplayMode     =   0
      DisplaySize     =   4
      Enabled         =   -1  'True
      EnableContextMenu=   -1  'True
      EnablePositionControls=   -1  'True
      EnableFullScreenControls=   0   'False
      EnableTracker   =   -1  'True
      Filename        =   ""
      InvokeURLs      =   -1  'True
      Language        =   -1
      Mute            =   0   'False
      PlayCount       =   1
      PreviewMode     =   0   'False
      Rate            =   1
      SAMILang        =   ""
      SAMIStyle       =   ""
      SAMIFileName    =   ""
      SelectionStart  =   -1
      SelectionEnd    =   -1
      SendOpenStateChangeEvents=   -1  'True
      SendWarningEvents=   -1  'True
      SendErrorEvents =   -1  'True
      SendKeyboardEvents=   0   'False
      SendMouseClickEvents=   0   'False
      SendMouseMoveEvents=   0   'False
      SendPlayStateChangeEvents=   -1  'True
      ShowCaptioning  =   0   'False
      ShowControls    =   -1  'True
      ShowAudioControls=   -1  'True
      ShowDisplay     =   0   'False
      ShowGotoBar     =   0   'False
      ShowPositionControls=   -1  'True
      ShowStatusBar   =   0   'False
      ShowTracker     =   -1  'True
      TransparentAtStart=   0   'False
      VideoBorderWidth=   0
      VideoBorderColor=   0
      VideoBorder3D   =   0   'False
      Volume          =   0
      WindowlessVideo =   0   'False
   End
   Begin VolControl.VolumeControl vc
      Left            =   2160
      Top             =   6360
      _ExtentX        =   847
      _ExtentY        =   847
      Volume          =   7
      DeviceToControl =   0
   End
   Begin VB.Label Label1
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "&About"
      BeginProperty Font
         Name            =   "Kauflinn"
         Size            =   15.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      Height          =   360
      Left            =   120
      MouseIcon       =   "Form1.frx":4B8A
      TabIndex        =   10
      ToolTipText     =   "About box"
      Top             =   1680
      Width           =   660
      WordWrap        =   -1  'True
   End
   Begin VB.Label lbltext
      AutoSize        =   -1  'True
      Caption         =   "Blast version 1.0.2"
      Height          =   195
      Left            =   0
      TabIndex        =   9
      Top             =   6360
      Width           =   1305
   End
   Begin VB.Label lbltime
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Height          =   195
      Left            =   2520
      TabIndex        =   5
      Top             =   1680
      Width           =   45
   End
   Begin VB.Label lblminimize
      BackStyle       =   0  'Transparent
      Height          =   255
      Left            =   8160
      TabIndex        =   3
      Top             =   0
      Width           =   255
   End
   Begin VB.Label Header
      BackStyle       =   0  'Transparent
      Height          =   375
      Left            =   0
      TabIndex        =   2
      Top             =   0
      Width           =   8535
   End
   Begin VB.Image Player
      Height          =   2175
      Left            =   0
      Picture         =   "Form1.frx":4E94
      Stretch         =   -1  'True
      Top             =   0
      Width           =   8535
   End
   Begin VB.Menu mnufav
      Caption         =   "Fav"
      Visible         =   0   'False
      Begin VB.Menu mnuremove
         Caption         =   "&Remove from list"
      End
      Begin VB.Menu mnuplay
         Caption         =   "&Play"
         Shortcut        =   ^P
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

'' Programmer: Ovais Ahmed
'' Application: A kind of music player.
'' AppName: Blast Player 2
'' Version: 1.0.2
'' Email: zovais_ahmed@yahoo.com

        ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
        '  $$$$$$$$$$$$$$
        '  $$            $$  $$           $$$$$$$       $$$$$$$$      $$$$$$$$$$$$$$$  '
        '  $$            $$  $$         $$       $$    $        $     $$$$$$   $$$$$$  '
        '  $$            $$  $$         $$       $$    $                   $   $       '
        '  $$$$$$$$$$$$$$    $$         $$       $$    $                   $   $       '
        '  $$            $$  $$         $$$$$$$$$$$     $$$$$$$$           $   $       '
        '  $$            $$  $$         $$       $$             $          $   $       '
        '  $$            $$  $$       $ $$       $$             $          $   $       '
        '  $$$$$$$$$$$$$$    $$$$$$$$$  $$       $$             $          $   $       '
        '  $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$          $$$$$$$      '
        '                                                                              '
        ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


' DECLARE THE VARIABLES
Dim Tx As Long
Dim Ty As Long

Dim X As Long
Dim Y As Long
Dim GX, GY


Private Sub chkmute_Click()
   ' IF CHECK SOUND MUTE, AUDIO OFF/ON
If chkmute.Value = vbChecked Then
   Mplayer.Mute = True
Else
   Mplayer.Mute = False
End If
  
End Sub

Private Sub cmdexit_Click()
      Mplayer.Stop
       End
End Sub

Private Sub cmdopen_Click()            ' Open file process take place
Form2.Show vbModal
End Sub

Private Sub cmdpause_Click()           ' Pause process take place
On Error Resume Next
      
If cmdpause.Caption = "P" Then
   Mplayer.Pause
   SongTime.Enabled = False
   cmdpause.Caption = "R"
Else
   cmdpause.Caption = "R"
   Mplayer.Play
   SongTime.Enabled = True
   cmdpause.Caption = "P"
End If

End Sub

Private Sub cmdplay_Click()          ' Play the mp3, wma files
On Error Resume Next

  SongTime.Enabled = True
  SongTime.Interval = 100
'''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''
        Mplayer.FileName = List2
        List2.ListIndex = List1.ListIndex
        duration.Max = Mplayer.duration
        Mplayer.Play
End Sub

Private Sub cmdstop_Click()           ' Stop Play files
On Error Resume Next

SongTime.Enabled = False
lbltime.Caption = ""
Mplayer.Stop         ' Stop song
duration.Value = 0

End Sub


Private Sub Form_Load()               ' Initialize process

On Error Resume Next
If App.PrevInstance = True Then        'If previous application is running so close process
     End
End If
'''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''
          Timer1.Enabled = True
          Timer1.Interval = 50
          Player.Picture = LoadPicture(App.Path & "\blast.bmp")
 
End Sub

Private Sub Form_Terminate()
  End
  Unload Me
End Sub

Private Sub Form_Unload(Cancel As Integer)
If Cancel = -1 Then
    End
    Unload Me
End If

End Sub

Private Sub Header_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
  GX = X
  GY = Y
  End If
End Sub
' Move form every where on the screen
Private Sub Header_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
      If Button = 1 Then
         Header.Parent.Move Header.Parent.Left + X - GX, Header.Parent.Top + Y - GY
      End If
End Sub

Private Sub HScroll1_Change()
vc.Volume = HScroll1.Value     ' CHANGE VOLUME
End Sub

Private Sub HScroll1_Scroll()
vc.Volume = HScroll1.Value    ' SCROLLING VOLUME COMMAND

End Sub

Private Sub Label1_Click()
frmAbout.Show vbModal

End Sub

Private Sub lblminimize_Click()
Form1.WindowState = vbMinimized ' Window minimized

End Sub

Private Sub List1_Click()
On Error Resume Next
List2.ListIndex = List1.ListIndex      ' Indexing taking place
End Sub

Private Sub List1_DblClick()              ' Double click list box and play process starts.
    cmdplay_Click
End Sub



Private Sub Duration_Scroll()            ' Seek bar scrolling with length of file
On Error Resume Next
Mplayer.CurrentPosition = duration
End Sub

Private Sub List1_KeyDown(KeyCode As Integer, Shift As Integer)
On Error Resume Next

   If KeyCode = vbKeyReturn Then cmdplay_Click
   If KeyCode = vbKeyP Then cmdplay_Click
   If KeyCode = vbKeyS Then cmdstop_Click

End Sub

Private Sub List1_Mousedown(Button As Integer, Shift As Integer, X As Single, Y As Single)

   If List1 = "" Then Exit Sub
If Button = 2 Then
   PopupMenu Form1.mnufav
End If
End Sub

Private Sub List1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
List1.ToolTipText = List1.Text

End Sub

Private Sub mnuplay_Click()
cmdplay_Click

End Sub

Private Sub mnuremove_Click()             ' Remove from list1
On Error Resume Next
     Dim i As String
     Dim h As String
'''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''
    List2.ListIndex = List1.ListIndex
    h = List2.ListIndex
    i = List2.ListIndex
    List1.RemoveItem i
    List2.RemoveItem h

 
End Sub



Private Sub Mplayer_EndOfStream(ByVal Result As Long)
On Error Resume Next                                      ' if Song complete start another one.
     SongTime.Enabled = False
     duration.Min = 0

   Dim i, j, k
   i = List1.ListIndex
   j = Val(List1.ListIndex) + 1
   k = List1.List(j)
   List1 = k
  
   cmdplay_Click
   duration.Value = 0
  
End Sub


Private Sub SongTime_Timer()
On Error Resume Next
Dim TimeSec
duration.Value = Int(Mplayer.CurrentPosition)
TimeSec = Mplayer.CurrentPosition
If duration.Value = duration.Max Then duration.Value = 0

Dim Min As Integer
Dim Sec As Integer

Min = TimeSec \ 60
Sec = TimeSec - (Min * 60)
If Sec = "-1" Then Sec = "00"
lbltime.Caption = "0" & Min & ":" & Sec
If Timer1.Enabled = False Then Exit Sub
Form1.Caption = "Blast Player ii " & lbltime.Caption
End Sub

Private Sub Timer1_Timer()
Picture1.Cls
     If Tx <= 0 - lbltext.Width Then
           Tx = Picture1.ScaleWidth
     Else
            Tx = Tx - 20
    End If
Picture1.CurrentX = Tx
Picture1.CurrentY = Ty
Picture1.Print lbltext.Caption
Picture1.ForeColor = QBColor(Int(Rnd() * 15))

End Sub

Project Homepage: