C# Windows Media Player
C# Windows Media Player
Controls
1. windows media player
2. List Box
2. List Box
3. Button
4.open File Dialog box
//c# code in Button click event
4.open File Dialog box
//c# code in Button click event
if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
files = openFileDialog1.SafeFileNames;
path = openFileDialog1.FileNames;
for (int i = 0; i < files.Length; i++)
{
listBox1.Items.Add(files[i]);
}
}
//Code in ListBox1 evetnt
axWindowsMediaPlayer1.URL = path[listBox1.SelectedIndex];
////////////////////////////////////////////////////Done////////////////////////////////////////////////////////////////////////////
axWindowsMediaPlayer1.URL = path[listBox1.SelectedIndex];
////////////////////////////////////////////////////Done////////////////////////////////////////////////////////////////////////////
Comments
Post a Comment