如何在没有Win Media Player的情况下将视频插入Windows窗体应用程序? [英] How to insert a video to windows forms application without Win Media Player?

查看:186
本文介绍了如何在没有Win Media Player的情况下将视频插入Windows窗体应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在试图弄清楚如何将视频片段添加到我的应用程序中,这些视频片段无法撤消,转发或停止。没有播放按钮,没有。只有视频。

I'm trying to figure out how to add a video clip into my application which cannot be reversed, forwarded or stopped. No play button, nothing. Only the video.

无需输入完整的代码。只是初学者的一些提示。 :)

No need to put in a full code. Just some tips for a beginner. :)

推荐答案

您好,

您可以使用例如。一个元素主持一个包含MediaElement的Wpf UserControl(然后显示视频)

you could use eg. an elementHost to host a Wpf UserControl that contains a MediaElement (which then displays the video)

https://msdn.microsoft.com/en-us/library/ms748248(v = vs .110).aspx

https://msdn.microsoft.com/en-us/library/ms748248(v=vs.110).aspx

[只是不创建控件来控制上面例子中的mediaElement]

[just dont create the Controls to control the mediaElement in the above example]

https://msdn.microsoft。 com / en-us / library / system.windows.controls.mediaelement(v = vs.110).aspx

https://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement(v=vs.110).aspx

https://msdn.microsoft.com/en-us/library /system.windows.forms.integration.elementhost(v = vs.110).aspx

https://msdn.microsoft.com/en-us/library/system.windows.forms.integration.elementhost(v=vs.110).aspx

问候,

  Thorsten

  Thorsten


这篇关于如何在没有Win Media Player的情况下将视频插入Windows窗体应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆