Untuk membuat MP3 Sederhana yang harus dilakukan adalah :
1. Buka Visual Basic 6.0
2. Pilih Standard.EXE
3. Klik kanan pada Toolbox dan Pilih
Components4. Pada Tab Controls berikan tanda cek pada
Microsoft Common Dialog Control 6.0 dan
Microsoft Multimedia Control 6.05. Pilih
OK6. Pilih
Microsoft Common Dialog Control 6.0 dan
Microsoft Multimedia Control 6.0 pada toolbox dan drag pada form
7. Buat satu buah listbox, satu buah commandbutton, dan dua buah timer
8. beri name pada masing-masing toolbox, seperti dibawah ini :
CommonDialog1 = CD1
Timer 1 = Timer2
Timer 2 = Timer3
Multimedia Control 6.0 = mmcaudio
Listbox = listpl
ComandButton = CMD_PILIH(caption = Open File)
9. Selanjutnya ketikkn kode brikut ini :
Dim buf As String * 256
Dim a As String, b As String, c As String, d As String, e As String
Dim getag
Private Sub CMD_PILIH_Click()
Dim buka As String
CD1.Filter = "MP3 Files|*.mp3|All Audio files|*.3gp;*.mp3;*.wav;**.DAT;.wma;*.mid|All files|*.*"
CD1.DialogTitle = "Mp3 Sederhana "
CD1.FileName = ""
CD1.ShowOpen
buka = CD1.FileName
If CD1.FileName = "" Then
Exit Sub
Else
listpl.AddItem CD1.FileTitle
End If
End Sub
Private Sub Form_Load()
CenterForm Me
Dim app_path As String
app_path = App.Path
If Right$(app_path, 1) <> "\" Then
app_path = app_path & "\"
End If
mmcaudio.Notify = False
mmcaudio.Wait = True
mmcaudio.Shareable = False
mmcaudio.Command = "close"
MsgBox "Mp3 Sederhana ", vbInformation, "Selamat Mencoba"
End Sub
Sub keterangan()
fizilepath = listpl.Text
If fizilepath <> "" Then
Open fizilepath For Binary As 1: N& = LOF(1): Get #1, (N& - 256), buf: Close 1
getag = InStr(1, buf, "tag", 1)
If getag = 0 Then
a$ = "-"
b$ = "-"
c$ = "-"
d$ = "-"
e$ = "Keterangan File Tidak diketahui"
Else
a$ = Mid$(buf, getag + 3, 30)
b$ = Mid$(buf, getag + 33, 30)
c$ = Mid$(buf, getag + 63, 30)
d$ = Mid$(buf, getag + 93, 4)
e$ = Mid$(buf, getag + 97, 30)
End If
End If
End Sub
Private Sub CenterForm(frm As Form)
frm.Top = Screen.Height / 2 - frm.Height / 2
frm.Left = Screen.Width / 2 - frm.Width / 2
End Sub
Private Sub Form_Unload(Cancel As Integer)
mmcaudio.Command = "close"
End Sub
Private Sub listpl_Click()
mmcaudio.Command = "Stop"
mmcaudio.Command = "Close"
mmcaudio.FileName = listpl.Text
mmcaudio.Command = "Open"
mmcaudio.Command = "Play"
keterangan
End Sub
Private Sub Timer2_Timer()
jam.Caption = Format(Now, "dddd, d MMMM yyyy HH:MM:SS")
End Sub
Private Sub Timer3_Timer()
Dim s As String
s = frmSplash.Caption
frmSplash.Caption = s
End Sub
10. Pembuatan MP3 Sederhana telah selesai, silahkan jalankan file dengan menekan F5