.DialogResult.OK Then
Close()
Else
Return
End If
End Sub
进入Timer1_Tick事件
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
HScrollBar1.Value = AxWindowsMediaPlayer1.Ctlcontrols.currentPosition
End Sub
进入HScrollBar1_Scroll事件
Private Sub HScrollBar1_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles HScrollBar1.Scroll
''进度条
AxWindowsMediaPlayer1.Ctlcontrols.currentPosition() = HScrollBar1.Value
End Sub
进入ListBox1_DoubleClick事件
Private Sub ListBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.DoubleClick
AxWindowsMediaPlayer1.URL = ListBox1.SelectedItem.ToString
End Sub
代码已经输入完毕,接下来我们需要运行
程序进行测试。
好了程序运行成功,此播放器已经具备了最基本的功能。感兴趣的朋友还可以向程序增加更多的功能。