如何在播放视频文件上放置透明的图片框? [英] How can you place a transparent picturebox over a playing video file?
本文介绍了如何在播放视频文件上放置透明的图片框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有一种简单的方法可以在播放的视频上放置透明的图片框?
此时我宁愿在同一张表格上进行此操作。我想做什么
显示视频,并在视频上放置一个图片框。
必须有可能但经过一天的尝试后我有点卡住了吗?即使是关于如何执行此操作的
链接也将非常感激。
Is there an easy way to place a transparent picture box over a playing video?
At this point I would rather do it on the same form. What I am trying to do
is display the video, and place a picture box frame over the video.
It must be possible but after a day of trying I am a little stuck? Even a
link on how to do this would be greatly appreciated.
推荐答案
一个非常简短的答案:作为GDI和DirectX(用于显示视频)不能很好地生活在一起,这可以被认为是一个太困难的问题。您需要使用带有System.Windows.Forms
的DirectX overlay 。例如,参见:
http ://www.unknowncheats.me/forum/c/62019-c-non-hooked-external-directx-overlay.html [ ^ ],
http://gregs-blog.com/2008/02/26/ managed-directx-c-graphics-tutorial-1-getting-started / [ ^ ]。
怎么办?我的建议是:不要到那儿,而是切换到WPF ,这本身就是基于DirectX。
WPF中的所有内容都可以半透明,所有内容都可以覆盖所有内容,包括视频,无需任何特别的努力。我测试了它;这很容易。
-SA
A very short answer: as GDI and DirectX (used to show video) don''t live well together, this can be considered to be a too difficult problem to bother. You would need to use DirectX overlay withSystem.Windows.Forms
. See, for example:
http://www.unknowncheats.me/forum/c/62019-c-non-hooked-external-directx-overlay.html[^],
http://gregs-blog.com/2008/02/26/managed-directx-c-graphics-tutorial-1-getting-started/[^].
What to do? My advice is: don''t get there, instead, switch to WPF, which is itself based on DirectX.
Everything in WPF can be made semi-transparent, everything can be overlaid over everything, including video, without any special effort. I tested it; it''s very easy.
—SA
这篇关于如何在播放视频文件上放置透明的图片框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文