如何在面板上放置透明GIF图像? [英] How to place transparent GIF image over a panel?

查看:123
本文介绍了如何在面板上放置透明GIF图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在使用Direct X在面板上播放视频.我想在该视频上放置透明的GIF图像.

为此,我创建了透明表单并将透明GIF图像放置在此表单上.但是,它会闪烁.

有什么好的解决方案,这样我就可以避免视频和图像的闪烁.此外,当我移动面板时,我无法移动透明形式.还有什么办法吗?

请帮助.

Hi guys,

I am playing a video over a panel using Direct X. I want to place a transparent GIF image over this video.

For this, i created transparent form and placed the transparent GIF image on this form. But, it statrs to flicker.

Is there any good solution so that i can avoid the flicker of video and the image. Further, when i move the panel i am unable to move the transaparent form. Is there any way for this too?

Pls help.

推荐答案

您可以尝试以表单的形式打开双缓冲.
You could try turning double-buffering on in the form.


Hii !!!


尝试这种方式(在调用InitializeComponent之后在构造函数中执行此操作)是怎么可能的:

Try it this way (do this in the constructor AFTER the call to InitializeComponent):

this.SetStyle(ControlStyles.AllPaintingInWmPaint | 
              ControlStyles.UserPaint | 
              ControlStyles.DoubleBuffer, true);



顺便说一句,您本可以为自己找到答案.



BTW, you could have ggogled to find this out for yourself.


这篇关于如何在面板上放置透明GIF图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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