***
5.
Aturlah
properties masing-masing kontrol seperti dibawah ini :
1.
Properties Form 1
Nama
Control
|
Properties
|
Setting
|
Label1
|
Aligment
Font |
2-Center
Courier New
|
Label2
|
Aligment
Caption
Fore Color
|
2-Center
Aplikasi Pemutar Music
&H0000C000&
|
Label3
|
Aligment
Font
Caption
Border Style
|
2-Center
Panama
***---====My Playlist====---***
1 Fixed Single
|
Label4
|
Caption
BackStyle
|
Created By Puralexdanu PJS
0-Transparent
|
Command1
|
Caption
|
Play
|
Command2
|
Caption
|
Add Files
|
Command3
|
Caption
|
Add Folder
|
Command4
|
Caption
|
Close
|
MMControl
|
EjectEnabled
EjectFisible
PauseEnable
PlayEnable
PlayVisible
StopEnabled
StopVisible
|
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
|
CommonDialog
|
CancelError
Filter
|
TRUE
*.mp3
|
WindowsMediaPlayer
|
-
|
-
|
List1
|
-
|
-
|
List2
|
-
|
-
|
Form1
|
Caption
|
Simple MP3 Player V1.7
|
2.
Properties
Form 2
Nama
Control
|
Properties
|
Setting
|
DriveListBox
|
-
|
-
|
DirListBox
|
-
|
-
|
ListBox
|
Caption
|
Kosongkan
|
Command1
|
Caption
|
Add
|
Command1
|
Caption
|
Cancel
|
Form2
|
Caption
|
Add File
|
3.
Properties Form 3
Nama
Control
|
Properties
|
Setting
|
Drive List Box
|
-
|
-
|
Dir ListBox
|
-
|
-
|
Command1
|
Caption
|
Add
|
Command2
|
Caption
|
Cancel
|
Form3
|
Caption
|
Add Folder
|
|
|
|
6.
Jika
semua komponen sudah diatur, ketikkan Kode/Listing/Script program seperti dibawah
ini :
a. Script Code Form 1
Private
Sub Command1_Click()
WindowsMediaPlayer1.URL =
CommonDialog1.FileName
WindowsMediaPlayer1.URL =
List2.List(List2.ListIndex)
End
Sub
Private
Sub Form_Unload(Cancel
As Integer)
MMControl1.Command =
"stop"
End
Sub
Private Sub
Command2_Click()
End
End
Sub
Private Sub
Command3_Click()
Form2.Show
End
Sub
Private Sub
Command4_Click()
Form3.Show
End
Sub
Private Sub Label1_Click()
Label1.Caption =
CommonDialog1.FileTitle
End
Sub
Private
Sub List1_Click()
List2.ListIndex =
List1.ListIndex
WindowsMediaPlayer1.URL =
List1.List(List1.ListIndex)
End
Sub
Private
Sub List1_DblClick()
Command1_Click
End
Sub
Private
Sub WindowsMediaPlayer1_EndOfStream(ByVal
Result As Long)
List1.ListIndex =
List1.ListIndex
List2.ListIndex =
List2.ListIndex
WindowsMediaPlayer1.URL =
List1.List(List1.ListIndex)
End
Sub
b. Script Code Form 2
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
c. Script Code Form 3
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()
Dir1.Path = File1.Path
End
Sub
Private
Sub Drive1_Change()
Dir1.Path = Drive1
End
Sub
Save hasil kerja anda dan kemudian silahkan run program
dengan menekan F5, lalu klik Add File >> tambah lagu yang diingin
>> klik 2x pada My Playlist / klik tombol Play, dan selamat mendengarkan.
7. Konfigurasi
selesai. Untuk menyimpan ke dalam file berekstensi .exe, caranya klik File
>>Pilih Make Simple MP3 Player V1.7 By Purwoko Ajie.exe >> pilih
folder tujuan >> klik Ok.
9.
Selamat Mencoba!!! Semoga Bermanfaat. . .
No comments:
Post a Comment