放置透明图像时避免闪烁 [英] Avoid flicker while placing a transparent image

查看:60
本文介绍了放置透明图像时避免闪烁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在视频上放置透明的"gif"图像.

我所做的是:一种用于播放视频的表单(我正在使用Directx播放视频),另一种是用于放置图像的透明表单(表单背景色和透明键相同的颜色).

但是在播放视频时,包含表格闪烁的图像.
有什么解决办法可以避免这种闪烁?

请帮助...我遇到了麻烦.

I want to place a transparent ''gif'' image over a video.

What i did is: one form for playing the video (I am using directx for playing video)and other one a transparent form (Form backcolor and transparent key same color)for placing the image.

But on playing the video, image containing form flickers.
Is there any solution to avoid this flicker?

Please help...i am in trouble.

推荐答案

您的代码在哪里?我怀疑您将无法做到这一点,您到底想做什么?我敢打赌WPF会做到无闪烁,所以我假设您正在使用Winforms吗?
Where is your code ? I suspect you''re not going to be able to do this cleanly, what are you trying to do exactly ? I bet WPF will do it without flicker, so I assume you''re using Winforms ?


为应用程序中的所有表单打开双缓冲.
Turn on double-buffering for all of the forms in your app.


是的,它也是正确的.然后它也闪烁.我希望你明白我的意思.

1.带有用于播放视频的控制面板的表单(使用Direct x)
由于我无法在此表单上添加透明图像.我添加了新表单(具有背景色和相同颜色的透明键使该表单透明),并添加了对该表单的图片框控件.


在运行此form2(透明表单)时,该表单(视频表单)就会出现.
更改视频后,Form2开始闪烁.

图像路径值从form1传递到form2.

另外,thanku也帮助了我
Yes ,its also true .Then too it flickers .I hope u got wht i meant.

1.form with a control panel used to play video (Using Direct x)
since i cannot adda transaparent image over this form .I added new form(with back color and transaparent key of same color to make the form transparent) and the added a picture box control over the form .


On running this form2(transaparent form) comes up on the form (video form).
On changing the video ,the Form2 starts to flicker.

Image path value is passed from form1 to form2.

Also thanku for helping me


这篇关于放置透明图像时避免闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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