Crazy Defender
Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
IndeksLatest imagesPencarianPendaftaranLogin

 

 Membuat MP3 Player Menggunakan Visual Basic 6.0

Go down 
PengirimMessage
[CZ12]ReaxtorHakers
Level 1

[CZ12]ReaxtorHakers


Jumlah posting Jumlah posting : 9
Join date 06.04.13
Lokasi Lokasi : Hacked

Membuat MP3 Player Menggunakan Visual Basic 6.0  Empty
PostSubyek: Membuat MP3 Player Menggunakan Visual Basic 6.0    Membuat MP3 Player Menggunakan Visual Basic 6.0  EmptySat Apr 06, 2013 2:13 pm

1. Buka program VB 6.0 dan pilih Standart.EXE
2. Masukkan 5 buah CommandButton, 1 buah komponen media player (msdxm.ocx) dan 2 buah ListBox kedalam Form1

3. Ganti Caption dari setiap tombol menjadi : Play,Stop,Pause,Add Files,Add Folder

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:

Ubah Caption Command1 = Add dan Caption Command2 = Cancel
Untuk FileListBox ubah Pattern = *.mp3


5. Masukkan lagi 1 buah Form (Form3) ke dalam Project anda dan tambahkan 1 buah DriveListBox, 1 buah DirListBox, dan 2 buah CommandButton




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. Test program (tekan F5)

11. Selamat ya... anda sudah berhasil membuat Mp3 player sendiri.
Kembali Ke Atas Go down
 
Membuat MP3 Player Menggunakan Visual Basic 6.0
Kembali Ke Atas 
Halaman 1 dari 1
 Similar topics
-
» Membuat Windows Media Player Menggunakan Visual Basic 6.0
» Buat Form Password menggunakan Visual Basic 6.0
» Apa Itu Visual Basic ??
» [Tips]Cara membuat form login di VisualBasic 6.0
» Membuat Kalkulator Sederhana

Permissions in this forum:Anda tidak dapat menjawab topik
Crazy Defender :: mizukawateam | Area :: Programming :: Visual Basic-
Navigasi: