Hi,
I created a Windows form application and added the Windows Media player COM component from the toolbox, under container sub section. Used C# and .net 4.0 framework, application built targeting x86 platform.
I have the below code on the media player load,
private void axWindowsMediaPlayer1_Enter(object sender, EventArgs e)
{
OpenFileDialog opend = new OpenFileDialog();
if (DialogResult.OK == opend.ShowDialog())
{
axWindowsMediaPlayer1.URL = opend.FileName;
axWindowsMediaPlayer1.Ctlcontrols.play();
}
}
Tested using a sample WMV file.
The application when run on Win 7 (32 or 64 bit), plays the WMV file correctly.
However, when I run the same application on Win XP SP3 (32 bit) or Win XP, the play back of the video blackens out and the playback is broken and results in nothing being visible. When the playback is blackened, I observed that the CPU utilization of the machine spiked to 100%. However, when I play the same WMV file on the installed Windows media player(WMP version 11) it plays fine.
I don't know, If I am missing anything.
Any help is greatly appreciated.
Thanks.