Dhimesh Parmar

Dhimesh Parmar

  • NA
  • 126
  • 14.6k

How to load video into winforms from resources

May 15 2018 6:03 AM
I need to use a code like this:
private void axWindowsMediaPlayer1_Enter(object sender, EventArgs e)
   {         
   axWindowsMediaPlayer1.URL = @"L:\about.mp4"; 
   }
 I have one button that execute this method when clicked:
private void button1_Click(object sender, EventArgs e) 
{         
   axWindowsMediaPlayer1.URL = @"E:/Song/Video/1.mp4";
         axWindowsMediaPlayer1.Ctlcontrols.play();
}

and a second button that execute this code when clicked:

private void button2_Click(object sender, EventArgs e) 
{         
   axWindowsMediaPlayer1.URL = @"E:/Song/Video/2.mp4";
         axWindowsMediaPlayer1.Ctlcontrols.play(); 
}

but none of these methods works. I need help to solve this problem.


 

Answers (2)