untuk membuat Sebuah Aplikasi Pemutar Musik versi sendiri sebaiknya ikuti langkah-langkah di bawah ini
- Download terlebih dahulu Project pemutar Musik dari bahasa pemograman Visual Studio 2012 disini
- setelah di download... buka aplikasi tersebut dengan mengklik pilihan (Kodok.vbproj)
maka akan tampil antarmuka dari project tersebut (Ctt: jika vb yang digunakan versinya dibawah 2012 atau di atas 2012 biasanya akan akan muncul tampilan peringatan, lanjutkan saja dengan klik ok atau next atau finish - jika sudah berada pada antar muka program klik 2x maka muncul delete semua Coding di Dalam form tersebut, kemudian Silahkan Copykan coding di bawah ini lalu Pastekan didalam Form tersebut!!!!!
Public Class MP3
Private Sub frmMCI_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed
Call CloseSong()
SaveListBox(ListBox1, "MySongList", ".txt", False)
End
End Sub
Private Sub frmMCI_Load(sender As Object, e As EventArgs) Handles MyBase.Load
LoadListBox(ListBox1, "MySongList", ".txt")
HScrollBar1.Maximum = 1000
Call SetVolume(500)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Call LoadSongFolder(ListBox1)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Call LoadSongFile(ListBox1)
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
If ListBox1.SelectedIndex >= 0 Then
SongPath = ListBox1.SelectedItem
Call SetSongFile(HScrollBar1, Label3)
Timer1.Enabled = True
Call PlaySong()
End If
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
Timer1.Enabled = False
Call StopSong()
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Call PauseSong()
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
Call MuteSong()
End Sub
Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
ListBox1.Items.Clear()
End Sub
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
If ListBox1.SelectedIndex >= 0 Then
ListBox1.Items.RemoveAt(ListBox1.SelectedIndex)
End If
End Sub
Private Sub HScrollBar2_Scroll(sender As Object, e As ScrollEventArgs) Handles HScrollBar2.Scroll
Call SetVolume(HScrollBar2.Value)
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
SongTime(Timer1, HScrollBar1, Label2, CheckBox1.Checked)
End Sub
Private Sub ListBox1_DoubleClick(sender As Object, e As EventArgs) Handles ListBox1.DoubleClick
SongPath = ListBox1.SelectedItem
Call SetSongFile(HScrollBar1, Label3)
Timer1.Enabled = False
Call PlaySong()
End Sub
Private Sub HScrollBar1_Scroll(sender As Object, e As ScrollEventArgs) Handles HScrollBar1.Scroll
Call PositionSong(HScrollBar1, Timer1)
End Sub
Private Sub CheckBox2_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox2.CheckedChanged
If CheckBox2.Checked = True Then
ListBox1.Sorted = False
Call RandomList(ListBox1)
Else
ListBox1.Sorted = True
ListBox1.Refresh()
End If
End Sub
Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
If ListBox1.SelectedIndex > 0 Then
ListBox1.SelectedIndex -= 1
SongPath = ListBox1.SelectedItem
Call SetSongFile(HScrollBar1, Label3)
Timer1.Enabled = True
Call PlaySong()
End If
End Sub
Private Sub Button10_Click(sender As Object, e As EventArgs) Handles Button10.Click
If ListBox1.SelectedIndex < ListBox1.Items.Count - 1 Then
ListBox1.SelectedIndex += 1
SongPath = ListBox1.SelectedItem
Call SetSongFile(HScrollBar1, Label3)
Timer1.Enabled = True
Call PlaySong()
End If
End Sub
Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged
End Sub
Private Sub LinkLabel2_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel2.LinkClicked
End Sub
End Class
lalu jalankan.. dengan menekan F5 atau langsung klik Star di Menu bar :)
selamat menikmati dan memodifikasi project tersebut sesuai dengan selera sendiri..
dan semoga bermamfaat..
Sign up here with your email