How to implement music playback and video playback in C # Winform
Namespace WindowsFormsApplication1
{
public partial class Form2:form
{
Public Form2 ()
{
InitializeComponent ();
SoundPlayer sp = new SoundPlayer ("C:/users/xingping.xu/documents/visual Studio 2010/projects/consoleapplication1/ Consoleapplication1/beautifultonight.wav ");//must be an audio file with a. wav extension
Sp. Playlooping ();//Loop play
Axwindowsmediaplayer1.url = "d:/vedios/2010 South Africa World Cup goal highlights 2010. DIY version-csdhd-01.avi ";
AxWindowsMediaPlayer1.settings.setMode ("Loop", true);
List<string> playlist=new list<string> ();
Playlist. ADD ("d:/vedios/2010 South Africa World Cup goal highlights 2010. DIY version-csdhd-01.avi ");
Playlist. ADD ("d:/vedios/2010 South Africa World Cup goal highlights 2010. DIY version-csdhd-02.avi ");
foreach (string item in playlist)
{
AxWindowsMediaPlayer1.currentPlaylist.appendItem (Axwindowsmediaplayer1.newmedia (item));
}
}
}
}
How to implement music playback and video playback in C # Winform