範例 code 如下:

OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Multiselect = true;
openFileDialog.Filter = "mp3文件|*.mp3|wav文件|*.wav|wma文件|*.wma|wmv文件|*.wmv|所有格式|*.*";
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
	axWindowsMediaPlayer1.currentPlaylist = axWindowsMediaPlayer1.newPlaylist("播放列表", "");
	foreach (string fn in openFileDialog.FileNames)
	{
		axWindowsMediaPlayer1.currentPlaylist.appendItem(axWindowsMediaPlayer1.newMedia(fn));
	}
}
axWindowsMediaPlayer1.Ctlcontrols.play();

 

arrow
arrow
    全站熱搜

    浮雲 發表在 痞客邦 留言(0) 人氣()