Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
- OpenFileDialog1.ShowDialog()
- WindowsMediaPlayer1.URL = OpenFileDialog1.FileName
- Label1.Text = WindowsMediaPlayer1.currentMedia.name
- Label1.Left = 100
- ListBox1.Items.Add(WindowsMediaPlayer1.URL)
- End Sub
- Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
- ListBox1.Items.Add(WindowsMediaPlayer1.URL)
- End Sub
- Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
- ListBox1.Items.Remove(ListBox1.SelectedItem)
- End Sub
- Private Sub ListBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.DoubleClick
- Try
- WindowsMediaPlayer1.URL = ListBox1.SelectedItem
- Label1.Text = WindowsMediaPlayer1.currentMedia.name
- Label1.Left = 100
- Catch ex As Exception
- End Try
- End Sub
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
- WindowsMediaPlayer1.Ctlcontrols.previous()
- End Sub
- Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
- WindowsMediaPlayer1.settings.volume = TrackBar1.Value
- End Sub
- Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- WindowsMediaPlayer1.Ctlcontrols.play()
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- WindowsMediaPlayer1.Ctlcontrols.pause()
- End Sub
- Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- WindowsMediaPlayer1.Ctlcontrols.stop()
- End Sub
- Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
- WindowsMediaPlayer1.Ctlcontrols.previous()
- End Sub
- Private Sub Button5_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
- WindowsMediaPlayer1.Ctlcontrols.next()
- End Sub
- Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
- ListBox1.Items.Clear()
- End Sub
- Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
- WindowsMediaPlayer1.settings.mute = CheckBox1.Checked
- End Sub
- Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
- Dim SaveFile As New SaveFileDialog()
- SaveFile.Filter = "bwmp Files |*.bwmp"
- SaveFile.ShowDialog()
- Dim WriteFile As New System.IO.StreamWriter(SaveFile.FileName)
- Dim Count As Integer = ListBox1.Items.Count - Val(1)
- For i As Integer = 0 To Count
- WriteFile.Write(ListBox1.Items.Item(i) & ";")
- Next
- WriteFile.Close()
- End Sub
- Private Sub LoadToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadToolStripMenuItem.Click
- Dim OpenFile As New OpenFileDialog
- OpenFile.Filter = "bwmp Files |*.bwmp"
- OpenFile.FileName = ""
- OpenFile.ShowDialog()
- Dim ReadFile As New System.IO.StreamReader(OpenFile.FileName)
- Dim Playlist As String = ReadFile.ReadToEnd
- Dim SplittedFase() = Playlist.Split(";")
- Dim Count As Integer = SplittedFase.Count - Val(1)
- Dim i As Integer = 0
- Do Until i = Count
- ListBox1.Items.Add(SplittedFase(i))
- i += Val(1)
- Loop
- ReadFile.Close()
- End Sub
- Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
- WindowsMediaPlayer1.Ctlcontrols.fastForward()
- End Sub
- Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
- WindowsMediaPlayer1.Ctlcontrols.fastReverse()
- End Sub
- Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click
- AboutBox1.Show()
- End Sub
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- If Label1.Left = -300 Then
- Label1.Left = 429
- Else
- Label1.Left -= 2
- End If
- End Sub
- Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
- If (WindowsMediaPlayer1.playState = WMPLib.WMPPlayState.wmppsStopped) Then
- If (ListBox1.SelectedIndex < ListBox1.Items.Count - 1) Then
- ListBox1.SelectedIndex = ListBox1.SelectedIndex + 1
- WindowsMediaPlayer1.URL = ListBox1.SelectedItem
- WindowsMediaPlayer1.Ctlcontrols.play()
- End If
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement