Müzik Çalar
Bu playere sizin sürücüden dalga ve midi dosyaları aramak ve o dosyaları normal çalıştığı gibi çalmasını sağlar. Bu projede, form içine bir ComboBox, bir DriveListBox, bir DirListBox, Bir TextBox ve bir FileListBox eklemek gerekir. Formunuza Microsoft Multimedya Kontrolü (MMControl) eklemek gerekir, görünür yada görünmez haline getirebilirsiniz.Ama bu programda, komut düğmelerinden oluşan oyuncu kontrollerini(başlat, dur, durdur felan) yapmak için görünmez hale getiriniz.
- ComboBox, dosyaları görüntüleme ve dosyaları farklı tipte seçmesine sağlar.
- DriveListBox-PC'nizde farklı sürücüler seçimi için kullanılabilir izin.
- DirListBox - dizinleri görüntülemek için
- TextBox - Seçilen dosyaları görüntülemek için
- FileListBox-de mevcut dosyaları görüntülemek
Uygulamanın düzgün çalışması için yukarıdaki tüm işlemleri koordine etmelisiniz.

Private Sub Combo1_Change() ' to determine file type If ListIndex = 0 Then File1.Pattern = ("*.wav") ElseIf ListIndex = 1 Then File1.Pattern = ("*.mid") Else Fiel1.Pattern = ("*.*") End If End Sub Private Sub Dir1_Change() 'To change directories and subdirectories(or folders and subfolders) File1.Path = Dir1.Path If Combo1.ListIndex = 0 Then File1.Pattern = ("*.wav") ElseIf Combo1.ListIndex = 1 Then File1.Pattern = ("*.mid") Else File1.Pattern = ("*.*") End If End Sub
Private Sub Drive1_Change()
'To change drives
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_Click()
If Combo1.ListIndex = 0 Then
File1.Pattern = ("*.wav")
ElseIf Combo1.ListIndex = 1 Then
File1.Pattern = ("*.mid")
Else
File1.Pattern = ("*.*")
End If
If Right(File1.Path, 1) <> "" Then
filenam = File1.Path + "" + File1.FileName
Else
filenam = File1.Path + File1.FileName
End If
Text1.Text = filenam
End Sub
Private Sub Form_Load()
'To center the Audioplayer startup page
Left = (Screen.Width - Width) 2
Top = (Screen.Height - Height) 2
Combo1.Text = "*.wav"
Combo1.AddItem "*.wav"
Combo1.AddItem "*.mid"
Combo1.AddItem "All files"
End Sub
Private Sub play_Click()
'To play WaveAudio file or Midi File
Command2_Click
If Combo1.ListIndex = 0 Then
AudioPlayer.DeviceType = "WaveAudio"
ElseIf Combo1.ListIndex = 1 Then
AudioPlayer.DeviceType = "Sequencer"
End If
AudioPlayer.FileName = Text1.Text
AudioPlayer.Command = "Open"
AudioPlayer.Command = "Play"
End Sub
Private Sub stop_Click()If AudioPlayer.Mode = 524 Then Exit Sub
If AudioPlayer.Mode <> 525 Then
AudioPlayer.Wait = True
AudioPlayer.Command = "Stop"
End If
AudioPlayer.Wait = True
AudioPlayer.Command = "Close"
End Sub
