Membuat Aplikasi MP3 Player Menggunakan Visual Basic 6.0

Home » » Membuat Aplikasi MP3 Player Menggunakan Visual Basic 6.0


1. Buka program VB 6.0 dan pilih Standart.EXE (yang belum punya VB 6.0 bisa anda download Di Sini Gan)

2. Masukkan 5 buah CommandButton, 1 buah komponen media player (msdxm.ocx) dan 2 buah ListBox kedalam Form1. Atur Posisinya seperti gambar di bawah ini:
Description: http://3.bp.blogspot.com/_QkjqxEVChvQ/TJla6oNVH1I/AAAAAAAAAJY/okZwbUJ0LT8/s320/1.JPG


3. Ganti Caption dari setiap tombol menjadi :
Description: http://1.bp.blogspot.com/_QkjqxEVChvQ/TJlbZayMdpI/AAAAAAAAAJg/iR3MjMI5Ptg/s320/2.JPG

4. Masukkan 1 buah Form (Form2) kedalam Projects dan tambahkan 1 buah DriveListbox, 1 buah DirListbox, 2 buah CommandButton dan 1 buah FileListBox kedalam Form2. Atur seperti gambar di bawah ini:
Description: http://4.bp.blogspot.com/_QkjqxEVChvQ/TJlb4FVkpCI/AAAAAAAAAJo/V6t29hwszPU/s320/3.JPG

Ubah Caption Command1 = Add dan Caption Command2 = Cancel Untuk FileListBox ubah Pattern = *.mp3 Tampilan Form2 akan menjadi seperti ini :
Description: http://4.bp.blogspot.com/_QkjqxEVChvQ/TJlcVzMNU4I/AAAAAAAAAJw/-74KSB_7nnk/s320/4.JPG

5. Masukkan lagi 1 buah Form (Form3) ke dalam Project anda dan tambahkan 1 buah DriveListBox, 1 buah DirListBox, dan 2 buah CommandButton. Atur Seperti gambar di bawah ini:
Description: http://1.bp.blogspot.com/_QkjqxEVChvQ/TJlcuQ4gkUI/AAAAAAAAAJ4/9VjW0qEr7EA/s320/5.JPG

Ubah Caption Command1 = Add dan Caption Command2 = Cancel 6. Ubah Properties dari Form1, Form2 & Form3 a. Form1 Caption = Mp3 Player StartUpPosition = 2-Center Screen b. Form2 Caption = Add File StartUpPosition = 2-Center Screen c. Form3 Caption = Add Foler StartUpPosition = 2-Center Screen

7. Kode/ Listing Form1
Private Sub Command1_Click() MediaPlayer1.Open List2 End Sub Private Sub Command2_Click() MediaPlayer1.Stop End Sub Private Sub Command3_Click() If MediaPlayer1.IsDurationValid = False Then Exit Sub If Command3.Caption = "Pause" Then MediaPlayer1.Pause Command3.Caption = "Resume" Else MediaPlayer1.Play Command3.Caption = "Pause" End If End Sub Private Sub Command4_Click() Form2.Show End Sub Private Sub Command5_Click() Form3.Show End Sub Private Sub List1_Click() List2.ListIndex = List1.ListIndex End Sub Private Sub List1_DblClick() Command1_Click End Sub


8. Kode/ Listing Form2
Private Sub Command1_Click() Form1.List1.AddItem File1 Form1.List2.AddItem Dir1.Path & "\" & File1 End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Dir1_Change() File1.Path = Dir1.Path End Sub Private Sub Drive1_Change() Dir1.Path = Drive1 End Sub Private Sub File1_DblClick() Form1.List1.AddItem File1 Form1.List2.AddItem Dir1.Path & "\" & File1 End Sub


9. Kode/Listing Form3
Private Sub Command1_Click() Dim a As Long Dim b As String If File1.ListCount = "0" Then Exit Sub: MsgBox "No files" For a& = 0 To File1.ListCount - 1 Form1.List1.AddItem File1.List(a&) Form1.List2.AddItem Dir1.Path & "\" & File1.List(a&) Next a Unload Me End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Dir1_Change() File1.Path = Dir1.Path End Sub Private Sub Drive1_Change() Dir1.Path = Drive1 End Sub

10. Tes program nya dulu sebelum di simpan !!!

kalau sudah bagus dan Mantap !!!! baru deh sobat simpan !!!
bagaimana ??? bagus kan ??? itu Tutorial yg simple aja, jika kurang puas sobat bisa mendesign nya lebih lanjut kok !!!

selamat yah !!! sobat sudah berhasil membuat Mp3 Player sendiri !!!

.
Share this article :