using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Microsoft.DirectX.AudioVideoPlayback; namespace webplayer { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { try { int width = panel1.Width; int height = panel1.Height; System.Uri u = new Uri("http://cassfordinfo.com/Testmovie.avi"); Video video; video = Video.FromUrl(u); video.Owner = panel1; video.Stop(); video.Play(); // resize the video to the size original size of the panel panel1.Size = new Size(width, height); }catch(Exception gh) { MessageBox.Show(gh.ToString()); } } } }
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.DirectX, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.<br /> File name: 'Microsoft.DirectX, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'<br /> at Microsoft.DirectX.AudioVideoPlayback.Video..ctor()<br /> at Microsoft.DirectX.AudioVideoPlayback.Video.FromUrl(Uri address)<br /> at webplayer.Form1.Form1_Load(Object sender, EventArgs e) in C:\Documents and Settings\vishnu\My Documents\Visual Studio 2008\Projects\webplayer\webplayer\Form1.cs:line 28<br /> <br /> WRN: Assembly binding logging is turned OFF.<br /> To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.<br /> Note: There is some performance penalty associated with assembly bind failure logging.<br /> To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)