本篇文章的主要開發環境是Visual Studio
打開 Visual Studio
由於我們需要以Windows Media Player作為播放控件
拖入我們的工具箱
選擇此控件拖入我們的Form
選擇Form
OpenFileDialog
控件屬性設置如下
Button
Button
Button
MenuStrip
MenuStrip
MenuStrip
MenuStrip
進入Button
Private Sub Button
OpenFileDialog
OpenFileDialog
If OpenFileDialog
AxWindowsMediaPlayer
ListBox
End If
End Sub
進入Button
Private Sub Button
If Button
AxWindowsMediaPlayer
Button
Else
AxWindowsMediaPlayer
Button
End If
End Sub
Private Sub 打開ToolStripMenuItem_Click(ByVal sender As System
Button
End Sub
進入Button
Private Sub Button
AxWindowsMediaPlayer
AxWindowsMediaPlayer
AxWindowsMediaPlayer
End Sub
進入 打開ToolStripMenuItem_Click事件
進入打開目錄ToolStripMenuItem_Click事件
Private Sub 打開目錄ToolStripMenuItem_Click(ByVal sender As System
If FolderBrowserDialog
Dim fi As IO
Dim dir As IO
Dim file As String
For Each fi In dir
file = fi
ListBox
Next
End If
End Sub
進入關閉ToolStripMenuItem_Click事件
Private Sub 關閉ToolStripMenuItem_Click(ByVal sender As System
If MessageBox
Close()
Else
Return
End If
End Sub
進入Timer
Private Sub Timer
HScrollBar
End Sub
進入HScrollBar
Private Sub HScrollBar
AxWindowsMediaPlayer
End Sub
進入ListBox
Private Sub ListBox
AxWindowsMediaPlayer
End Sub 代碼已經輸入完畢
好了程序運行成功
From:http://tw.wingwit.com/Article/program/net/201311/12359.html