本文介绍了使用Windows Media Player COM组件播放视频 - Visual Studio 2013 - 在Win XP上播放问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我创建了一个Windows表单应用程序,并在容器子部分下的工具箱中添加了Windows Media Player COM组件。使用C#和.net 4.0框架,针对x86平台构建的应用程序。



我在媒体播放器加载时有以下代码,

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();
            }
        }



使用示例WMV文件进行测试。

在Win 7上运行的应用程序(32或64位),正确播放WMV文件。



但是,当我在Win XP SP3(32位)或Win XP上运行相同的应用程序时,播放视频变黑,播放中断,导致无法看到。当回放变黑时,我发现机器的CPU利用率飙升至100%。但是,当我在安装的Windows媒体播放器(WMP版本11)上播放相同的WMV文件时,它可以正常播放。



我不知道,如果我遗失任何东西。



非常感谢任何帮助。

谢谢。


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.

推荐答案

{
    Dim Process.Start as app
    Dim app.Compatibility(); e as c
    {
    app (axWindowsMediaPlayer1.Open();
    appId = (c)app (assignedId)
    app.app (c) == servicePack1 , servicePack2
    }

}


这篇关于使用Windows Media Player COM组件播放视频 - Visual Studio 2013 - 在Win XP上播放问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 13:39