PDA

View Full Version : سورس برنامه موزیک و دی وی دی پلیر



Reza Safa
پنج شنبه 27 دی 1386, 07:51 صبح
کلید تشکر فراموش نشود :خجالت:

کاره خودمه



Public Class Main
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Public WithEvents ToolTip1 As System.Windows.Forms.ToolTip
Public WithEvents ImageList1 As System.Windows.Forms.ImageList
Public WithEvents NotifyIcon1 As System.Windows.Forms.NotifyIcon
Public WithEvents imgPic As System.Windows.Forms.PictureBox
Public WithEvents cmControls As System.Windows.Forms.ContextMenu
Public WithEvents btnPrevious As System.Windows.Forms.Button
Public WithEvents btnPlay As System.Windows.Forms.Button
Public WithEvents btnPause As System.Windows.Forms.Button
Public WithEvents btnNext As System.Windows.Forms.Button
Public WithEvents btnEject As System.Windows.Forms.Button
Public WithEvents btnOpenFile As System.Windows.Forms.Button
Public WithEvents lblMenu As System.Windows.Forms.Label
Public WithEvents ListBox As System.Windows.Forms.GroupBox
Public WithEvents cmOpen As System.Windows.Forms.MenuItem
Public WithEvents cmControlss As System.Windows.Forms.MenuItem
Public WithEvents cmEjectcd As System.Windows.Forms.MenuItem
Public WithEvents cmPrevious As System.Windows.Forms.MenuItem
Public WithEvents cmPlay As System.Windows.Forms.MenuItem
Public WithEvents cmPause As System.Windows.Forms.MenuItem
Public WithEvents cmNext As System.Windows.Forms.MenuItem
Public WithEvents cmAbout As System.Windows.Forms.MenuItem
Public WithEvents cmVisit As System.Windows.Forms.MenuItem
Public WithEvents cmClose As System.Windows.Forms.MenuItem
Public WithEvents MenuItem1 As System.Windows.Forms.MenuItem
Public WithEvents MenuItem2 As System.Windows.Forms.MenuItem
Public WithEvents MenuItem3 As System.Windows.Forms.MenuItem
Public WithEvents MenuItem4 As System.Windows.Forms.MenuItem
Public WithEvents MenuItem5 As System.Windows.Forms.MenuItem
Public WithEvents lstPlayList As System.Windows.Forms.ListBox
Public WithEvents btnStop As System.Windows.Forms.Button
Public WithEvents MenuItem6 As System.Windows.Forms.MenuItem
Public WithEvents cmStop As System.Windows.Forms.MenuItem
Public WithEvents ControlBox1 As System.Windows.Forms.GroupBox
Public WithEvents cmPlayList As System.Windows.Forms.ContextMenu
Public WithEvents cmpPlay As System.Windows.Forms.MenuItem
Public WithEvents cmpClearList As System.Windows.Forms.MenuItem
Public WithEvents MenuItem7 As System.Windows.Forms.MenuItem
'Public WithEvents Dialog As MSComDlg.CommonDialog
Friend WithEvents Dialog As AxMSComDlg.AxCommonDialog
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Main))
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.cmControls = New System.Windows.Forms.ContextMenu
Me.cmOpen = New System.Windows.Forms.MenuItem
Me.MenuItem1 = New System.Windows.Forms.MenuItem
Me.cmEjectcd = New System.Windows.Forms.MenuItem
Me.MenuItem2 = New System.Windows.Forms.MenuItem
Me.cmControlss = New System.Windows.Forms.MenuItem
Me.cmStop = New System.Windows.Forms.MenuItem
Me.MenuItem5 = New System.Windows.Forms.MenuItem
Me.cmPlay = New System.Windows.Forms.MenuItem
Me.cmPause = New System.Windows.Forms.MenuItem
Me.MenuItem6 = New System.Windows.Forms.MenuItem
Me.cmNext = New System.Windows.Forms.MenuItem
Me.cmPrevious = New System.Windows.Forms.MenuItem
Me.MenuItem3 = New System.Windows.Forms.MenuItem
Me.cmVisit = New System.Windows.Forms.MenuItem
Me.cmAbout = New System.Windows.Forms.MenuItem
Me.MenuItem4 = New System.Windows.Forms.MenuItem
Me.cmClose = New System.Windows.Forms.MenuItem
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
Me.NotifyIcon1 = New System.Windows.Forms.NotifyIcon(Me.components)
Me.ControlBox1 = New System.Windows.Forms.GroupBox
Me.Dialog = New AxMSComDlg.AxCommonDialog
Me.lblMenu = New System.Windows.Forms.Label
Me.btnPrevious = New System.Windows.Forms.Button
Me.imgPic = New System.Windows.Forms.PictureBox
Me.btnPlay = New System.Windows.Forms.Button
Me.btnPause = New System.Windows.Forms.Button
Me.btnNext = New System.Windows.Forms.Button
Me.btnEject = New System.Windows.Forms.Button
Me.btnOpenFile = New System.Windows.Forms.Button
Me.btnStop = New System.Windows.Forms.Button
Me.ListBox = New System.Windows.Forms.GroupBox
Me.lstPlayList = New System.Windows.Forms.ListBox
Me.cmPlayList = New System.Windows.Forms.ContextMenu
Me.cmpPlay = New System.Windows.Forms.MenuItem
Me.MenuItem7 = New System.Windows.Forms.MenuItem
Me.cmpClearList = New System.Windows.Forms.MenuItem
Me.ControlBox1.SuspendLayout()
CType(Me.Dialog, System.ComponentModel.ISupportInitialize).BeginIni t()
Me.ListBox.SuspendLayout()
Me.SuspendLayout()
'
'cmControls
'
Me.cmControls.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.cmOpen, Me.MenuItem1, Me.cmEjectcd, Me.MenuItem2, Me.cmControlss, Me.MenuItem3, Me.cmVisit, Me.cmAbout, Me.MenuItem4, Me.cmClose})
'
'cmOpen
'
Me.cmOpen.Index = 0
Me.cmOpen.Text = "Open"
'
'MenuItem1
'
Me.MenuItem1.Index = 1
Me.MenuItem1.Text = "-"
'
'cmEjectcd
'
Me.cmEjectcd.Index = 2
Me.cmEjectcd.Text = "Eject CD"
'
'MenuItem2
'
Me.MenuItem2.Index = 3
Me.MenuItem2.Text = "-"
'
'cmControlss
'
Me.cmControlss.Index = 4
Me.cmControlss.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.cmStop, Me.MenuItem5, Me.cmPlay, Me.cmPause, Me.MenuItem6, Me.cmNext, Me.cmPrevious})
Me.cmControlss.Text = "Controls"
'
'cmStop
'
Me.cmStop.Index = 0
Me.cmStop.Text = "Stop"
'
'MenuItem5
'
Me.MenuItem5.Index = 1
Me.MenuItem5.Text = "-"
'
'cmPlay
'
Me.cmPlay.Index = 2
Me.cmPlay.Text = "Play"
'
'cmPause
'
Me.cmPause.Index = 3
Me.cmPause.Text = "Pause"
'
'MenuItem6
'
Me.MenuItem6.Index = 4
Me.MenuItem6.Text = "-"
'
'cmNext
'
Me.cmNext.Index = 5
Me.cmNext.Text = "Next"
'
'cmPrevious
'
Me.cmPrevious.Index = 6
Me.cmPrevious.Text = "Previous"
'
'MenuItem3
'
Me.MenuItem3.Index = 5
Me.MenuItem3.Text = "-"
'
'cmVisit
'
Me.cmVisit.Index = 6
Me.cmVisit.Text = "Visit Web Site"
'
'cmAbout
'
Me.cmAbout.Index = 7
Me.cmAbout.Text = "About"
'
'MenuItem4
'
Me.MenuItem4.Index = 8
Me.MenuItem4.Text = "-"
'
'cmClose
'
Me.cmClose.Index = 9
Me.cmClose.Text = "Close"
'
'ImageList1
'
Me.ImageList1.ImageSize = New System.Drawing.Size(32, 32)
Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
'
'NotifyIcon1
'
Me.NotifyIcon1.ContextMenu = Me.cmControls
Me.NotifyIcon1.Icon = CType(resources.GetObject("NotifyIcon1.Icon"), System.Drawing.Icon)
Me.NotifyIcon1.Text = "Audio Player .Net"
Me.NotifyIcon1.Visible = True
'
'ControlBox1
'
Me.ControlBox1.Controls.Add(Me.Dialog)
Me.ControlBox1.Controls.Add(Me.lblMenu)
Me.ControlBox1.Controls.Add(Me.btnPrevious)
Me.ControlBox1.Controls.Add(Me.imgPic)
Me.ControlBox1.Controls.Add(Me.btnPlay)
Me.ControlBox1.Controls.Add(Me.btnPause)
Me.ControlBox1.Controls.Add(Me.btnNext)
Me.ControlBox1.Controls.Add(Me.btnEject)
Me.ControlBox1.Controls.Add(Me.btnOpenFile)
Me.ControlBox1.Controls.Add(Me.btnStop)
Me.ControlBox1.Location = New System.Drawing.Point(8, 8)
Me.ControlBox1.Name = "ControlBox1"
Me.ControlBox1.Size = New System.Drawing.Size(328, 168)
Me.ControlBox1.TabIndex = 0
Me.ControlBox1.TabStop = False
'
'Dialog
'
Me.Dialog.ContainingControl = Me
Me.Dialog.Enabled = True
Me.Dialog.Location = New System.Drawing.Point(24, 16)
Me.Dialog.Name = "Dialog"
Me.Dialog.OcxState = CType(resources.GetObject("Dialog.OcxState"), System.Windows.Forms.AxHost.State)
Me.Dialog.Size = New System.Drawing.Size(32, 32)
Me.Dialog.TabIndex = 3
'
'lblMenu
'
Me.lblMenu.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.lblMenu.ContextMenu = Me.cmControls
Me.lblMenu.ImageIndex = 3
Me.lblMenu.ImageList = Me.ImageList1
Me.lblMenu.Location = New System.Drawing.Point(288, 128)
Me.lblMenu.Name = "lblMenu"
Me.lblMenu.Size = New System.Drawing.Size(32, 32)
Me.lblMenu.TabIndex = 2
Me.lblMenu.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'btnPrevious
'
Me.btnPrevious.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnPrevious.ImageIndex = 6
Me.btnPrevious.ImageList = Me.ImageList1
Me.btnPrevious.Location = New System.Drawing.Point(8, 128)
Me.btnPrevious.Name = "btnPrevious"
Me.btnPrevious.Size = New System.Drawing.Size(32, 32)
Me.btnPrevious.TabIndex = 1
Me.btnPrevious.TabStop = False
'
'imgPic
'
Me.imgPic.Image = CType(resources.GetObject("imgPic.Image"), System.Drawing.Image)
Me.imgPic.Location = New System.Drawing.Point(8, 16)
Me.imgPic.Name = "imgPic"
Me.imgPic.Size = New System.Drawing.Size(312, 104)
Me.imgPic.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchIma ge
Me.imgPic.TabIndex = 0
Me.imgPic.TabStop = False
'
'btnPlay
'
Me.btnPlay.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnPlay.ImageIndex = 5
Me.btnPlay.ImageList = Me.ImageList1
Me.btnPlay.Location = New System.Drawing.Point(48, 128)
Me.btnPlay.Name = "btnPlay"
Me.btnPlay.Size = New System.Drawing.Size(32, 32)
Me.btnPlay.TabIndex = 1
Me.btnPlay.TabStop = False
'
'btnPause
'
Me.btnPause.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnPause.ImageIndex = 4
Me.btnPause.ImageList = Me.ImageList1
Me.btnPause.Location = New System.Drawing.Point(128, 128)
Me.btnPause.Name = "btnPause"
Me.btnPause.Size = New System.Drawing.Size(32, 32)
Me.btnPause.TabIndex = 1
Me.btnPause.TabStop = False
'
'btnNext
'
Me.btnNext.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnNext.ImageIndex = 1
Me.btnNext.ImageList = Me.ImageList1
Me.btnNext.Location = New System.Drawing.Point(168, 128)
Me.btnNext.Name = "btnNext"
Me.btnNext.Size = New System.Drawing.Size(32, 32)
Me.btnNext.TabIndex = 1
Me.btnNext.TabStop = False
'
'btnEject
'
Me.btnEject.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnEject.ImageIndex = 2
Me.btnEject.ImageList = Me.ImageList1
Me.btnEject.Location = New System.Drawing.Point(208, 128)
Me.btnEject.Name = "btnEject"
Me.btnEject.Size = New System.Drawing.Size(32, 32)
Me.btnEject.TabIndex = 1
Me.btnEject.TabStop = False
'
'btnOpenFile
'
Me.btnOpenFile.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnOpenFile.ImageIndex = 0
Me.btnOpenFile.ImageList = Me.ImageList1
Me.btnOpenFile.Location = New System.Drawing.Point(248, 128)
Me.btnOpenFile.Name = "btnOpenFile"
Me.btnOpenFile.Size = New System.Drawing.Size(32, 32)
Me.btnOpenFile.TabIndex = 1
Me.btnOpenFile.TabStop = False
'
'btnStop
'
Me.btnStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnStop.ImageIndex = 7
Me.btnStop.ImageList = Me.ImageList1
Me.btnStop.Location = New System.Drawing.Point(88, 128)
Me.btnStop.Name = "btnStop"
Me.btnStop.Size = New System.Drawing.Size(32, 32)
Me.btnStop.TabIndex = 1
Me.btnStop.TabStop = False
'
'ListBox
'
Me.ListBox.Controls.Add(Me.lstPlayList)
Me.ListBox.Location = New System.Drawing.Point(344, 8)
Me.ListBox.Name = "ListBox"
Me.ListBox.Size = New System.Drawing.Size(176, 168)
Me.ListBox.TabIndex = 1
Me.ListBox.TabStop = False
'
'lstPlayList
'
Me.lstPlayList.ContextMenu = Me.cmPlayList
Me.lstPlayList.Location = New System.Drawing.Point(8, 16)
Me.lstPlayList.Name = "lstPlayList"
Me.lstPlayList.Size = New System.Drawing.Size(160, 147)
Me.lstPlayList.TabIndex = 0
'
'cmPlayList
'
Me.cmPlayList.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.cmpPlay, Me.MenuItem7, Me.cmpClearList})
'
'cmpPlay
'
Me.cmpPlay.Index = 0
Me.cmpPlay.Text = "Play Item"
'
'MenuItem7
'
Me.MenuItem7.Index = 1
Me.MenuItem7.Text = "-"
'
'cmpClearList
'
Me.cmpClearList.Index = 2
Me.cmpClearList.Text = "Clear List"
'
'Main
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(530, 184)
Me.Controls.Add(Me.ListBox)
Me.Controls.Add(Me.ControlBox1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.MaximizeBox = False
Me.Name = "Main"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScree n
Me.Text = "Safasoft Media Player"
Me.ControlBox1.ResumeLayout(False)
CType(Me.Dialog, System.ComponentModel.ISupportInitialize).EndInit( )
Me.ListBox.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
'----Contex Menu----'
Private Sub cmVisit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmVisit.Click
Sh.Open("http://www.SafasoftCo.com")
End Sub
Private Sub cmClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmClose.Click
mSub.Close_Program()
End Sub
Private Sub cmAbout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmAbout.Click
mSub.About_Program()
End Sub
Private Sub cmPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmPrevious.Click
btnPrevious_Click(sender, e)
End Sub
Private Sub cmPlay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmPlay.Click
btnPlay_Click(sender, e)
End Sub
Private Sub cmStop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmStop.Click
btnStop_Click(sender, e)
End Sub
Private Sub cmPause_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmPause.Click
btnPause_Click(sender, e)
End Sub
Private Sub cmNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmNext.Click
btnNext_Click(sender, e)
End Sub
Private Sub cmOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmOpen.Click
btnOpenFile_Click(sender, e)
End Sub
Private Sub cmEjectcd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmEjectcd.Click
btnEject_Click(sender, e)
End Sub
'----Controls----'
Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrevious.Click
mSub.PreviousMusic(Me.lstPlayList.Items.Count)
End Sub
Private Sub btnPlay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPlay.Click
mSub.PlayMusic()
End Sub
Private Sub btnStop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStop.Click
mSub.StopMusic()
End Sub
Private Sub btnPause_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPause.Click
mSub.PauseMusic()
End Sub
Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
mSub.NextMusic(Me.lstPlayList.Items.Count)
End Sub
Private Sub btnOpenFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpenFile.Click
mSub.FileOpen = Open()
'----
With Dialog
If .FileName <> "" Then
lstPlayList.Items.Add(.FileTitle)
mSub.Player.Stop()
Call MemorySub(lstPlayList.Items.Count, .FileTitle, .FileName, True)
Else
Exit Sub
End If
End With
End Sub
Private Sub btnEject_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEject.Click
mSub.EjectCD()
End Sub
'----Play List Menu----'
Private Sub cmpPlay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmpPlay.Click
With lstPlayList
Call StopMusic()
On Error Resume Next
'MsgBox(.SelectedIndex + 1)
If .Items.Count <> 0 Then Call MemorySub(.SelectedIndex + 1, Free, Free, False)
End With
End Sub
Private Sub cmpClearList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmpClearList.Click
ClearList()
End Sub
'----
Public Sub ClearList()
mSub.StopMusic()
On Error Resume Next
'----
Dim I As Integer
'----
blnPlay = False
blnStop = False
blnPause = False
'----
With lstPlayList
If .Items.Count <> 0 Then
For I = 1 To .Items.Count
.Items.RemoveAt(0)
Next I
End If
End With
For I = 1 To 100
intShomareh(I) = 0
strFileName(I) = 0
strFileAddress(I) = 0
Next I
'----
FileRun = ""
Index = 0
End Sub
Private Sub lstPlayList_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstPlayList.DoubleClick
With lstPlayList
Call StopMusic()
'MsgBox(.SelectedIndex + 1)
If .Items.Count <> 0 Then Call MemorySub(.SelectedIndex + 1, Free, Free, False)
End With
End Sub
Public Function Open() As String
With Dialog
.FileName = ""
.DialogTitle = "Open File"
.Filter = "All File (*.*)|*.*"
.ShowOpen()
If .FileName <> "" Then
Return .FileName
Else
Exit Function
End If
End With
End Function
Private Sub lstPlayList_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstPlayList.SelectedIndexChanged
End Sub
End Class



Public Module mSub
Public Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
'----
Public Player As New QuartzTypeLib.FilgraphManagerClass
Public Sh As New Shell32.ShellClass
Public FileOpen As String
'----
Dim FormMain As New Main
'----Begin Version Before----'
Public blnPlay As Boolean
Public blnStop As Boolean
Public blnPause As Boolean
'----
Public intShomareh(100) As Integer
Public strFileName(100) As String
Public strFileAddress(100) As String
'----
Public Free As String
Public FileRun As String
Public Index As Integer
'----End Version Before----'
Public VaziatCDRom As Boolean ' true = open cdrom
'----
Public Sub About_Program()
MessageBox.Show("Program : Media Player" & vbCrLf & _
"Version : 2006 . 1 . 4" & vbCrLf & _
"Programming : Reza Soleymani Safa" & vbCrLf & _
"Visit web site : http://www.SafasoftCo.com (http://www.safasoftco.com/)", _
"Media Palyer - Safasoft Corporation ", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Public Sub Close_Program()
'----
Application.Exit()
End Sub
'----
Public Sub PlayMusic()
'If Player Is Nothing Then Exit Sub 'Not playing nothing to pause!
'----
If FileRun <> "" Then
Call MemorySub(Index, Free, Free, False)
Else
Exit Sub
End If
End Sub
Public Sub PauseMusic()
'If Player Is Nothing Then Exit Sub 'Not playing nothing to pause!
'----
If FileRun <> "" Then
If blnPlay <> True Then
Player.Run()
blnPlay = True ' Play
blnStop = False ' No
blnPause = False ' No
Else
Player.Pause()
'----
blnPause = True
blnPlay = False
blnStop = False
End If
Else
Exit Sub
End If
End Sub
Public Sub NextMusic(ByVal Count As Integer)
If Player Is Nothing Then Exit Sub 'Not playing nothing to pause!
'----
Dim MemListCount As Integer
Dim Number As Integer
'----
MemListCount = Count
'----
If blnPlay = True Then Call StopMusic()
'With lstPlayList
'If .ListCount <> 0 Then
If Count <> 0 Then
If Index = MemListCount Then
Call MemorySub(1, Free, Free, False)
Else
Number = Index + 1
Call MemorySub(Number, Free, Free, False)
End If
Else
Exit Sub
End If
'End With
End Sub
Public Sub PreviousMusic(ByVal Count As Integer)
'If Player Is Nothing Then Exit Sub 'Not playing nothing to pause!
'----
Dim MemListCount As Integer
Dim Number As Integer
'----
MemListCount = Count
'----
If blnPlay = True Then Call StopMusic()
'With lstPlayList
' If .ListCount <> 0 Then
If Count <> 0 Then
If Index = 1 Then
Call MemorySub(MemListCount, Free, Free, False)
Else
Number = Index - 1
Call MemorySub(Number, Free, Free, False)
End If
Else
Exit Sub
End If
'End With
End Sub
Public Sub StopMusic()
If Player Is Nothing Then Exit Sub 'Not playing nothing to pause!
'----
If FileRun <> "" Then
If blnPlay <> True Then
Exit Sub
Else
Player.Stop()
Player = Nothing
Player = New QuartzTypeLib.FilgraphManagerClass
'----
blnStop = True
blnPlay = False
blnPause = False
End If
Else
Exit Sub
End If
End Sub
'----
Public Sub EjectCD()
Dim retvalue As Long
Dim returnstring As String
'----
Select Case VaziatCDRom
Case True
retvalue = mciSendString("set CDAudio door closed", returnstring, 127, 0)
VaziatCDRom = False
Case False
retvalue = mciSendString("set CDAudio door open", returnstring, 127, 0)
VaziatCDRom = True
End Select
End Sub
'----Begin Version Before----'
'Public Sub ClearList()
' Dim I As Integer
' '----
' blnPlay = False
' blnStop = False
' blnPause = False
' '----
' With FormMain.lstPlayList
' If .Items.Count <> 0 Then
' For I = 1 To .Items.Count
' .Items.RemoveAt(0)
' Next I
' End If
' End With
' For I = 1 To 100
' intShomareh(I) = 0
' strFileName(I) = 0
' strFileAddress(I) = 0
' Next I
' '----
' FileRun = ""
' Index = 0
'End Sub
Public Sub MemorySub(ByVal Num As Integer, ByVal Name As String, ByVal Address As String, ByVal Vaziat As Boolean)
'True = Open
'False = Other
Player.Stop()
Player = Nothing
Player = New QuartzTypeLib.FilgraphManagerClass
'----
Dim AddressOpenFileRun As String
'----
If Vaziat = True Then
'----
Player.RenderFile(Address) ' Load File
Player.Run() ' Run File ( Play )
'----
intShomareh(Num) = Num ' Set
strFileName(Num) = Name ' Set
strFileAddress(Num) = Address ' Set
'----
FileRun = Address ' Set File Run ( Run )
Index = Num ' Set Index File Run
'----
blnPlay = True ' Play
blnStop = False ' No
blnPause = False ' No
Else
AddressOpenFileRun = strFileAddress(Index) ' Load File
Player.RenderFile(AddressOpenFileRun) ' Load File
Player.Run() ' Run File ( Play )
'----
FileRun = AddressOpenFileRun ' Set File Run ( Run )
Index = Num ' Set Index File Run
'----
blnPlay = True ' Play
blnStop = False ' No
blnPause = False ' No
End If
End Sub
'----End Version Before----'
End Module
اینم فایل برنامه

morteza_261
پنج شنبه 27 دی 1386, 17:14 عصر
سلام
دستت درد نکنه ولی یه چیزی
آقا مثل اینکه برای پوشه پسوورد گذاشتی و یادت رفته بزاری
اگه پسووردشم بزاری کامله

Reza Safa
دوشنبه 25 آبان 1388, 11:55 صبح
دوستان اين نرم افزار را پيشرفته تر نکردند ؟
هرکي اين نرم افزار را قابليتش را بيشتر کرده به ما بگه تا ديگران استفاده کنند