淡化Delphi中的Alpha混合PNG格式 [英] Fade in an alpha-blended PNG form in Delphi

查看:171
本文介绍了淡化Delphi中的Alpha混合PNG格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几年前,当Vista首次发布时,我曾经问过一个关于这个问题的问题,但是从来没有解决过这个问题,而是把它搁置在后面。



我有一个启动画面,我非常努力,使看起来不错。这是一个32bpp的alpha混合PNG。我有一些代码(如果需要,我可以挖掘),在Windows XP或Vista +下,当桌面组合关闭时,它的效果非常好。然而,在Vista +下,所有的透明部分都是黑色的,摧毁了所有看起来很棒的东西!



所以,我的问题是这样的:任何人都可以显示一个32bpp alpha混合PNG作为启动屏幕,以启用桌面组合的方式起作用。我不反对使用第三方组件,如果需要,免费或其他方式。



理想情况下,这将适用于Delphi 7。



更新:除了下面的答案,哪个工作得很好,我发现TMS TAdvSmoothSplashScreen组件也很好地处理这个任务,如果稍微复杂一些。

解决方案

Tim,我刚刚在Vista / D2007上尝试使用'Windows Classic'主题:



Alpha混合闪屏在Delphi中 - 第2部分
http://melander.dk/articles/alphasplash2/2/



没有黑色的背景,我可以看到...仍然看起来不错。


I asked a question about this some years back when Vista was first released, but never resolved the problem and shelved it as something to consider later.

I have a splash screen that I went to great effort to make look great. It's a 32bpp alpha-blended PNG. I have some code (which I can dig up if required!) that works great under Windows XP or under Vista+ when desktop composition is turned off. However, under Vista+ all the transparent parts are black, destroying everything that looks great about it!

So, my question is this: as anyone been able to display a 32bpp alpha-blended PNG as a splash screen in a way that works both with and without desktop composition activated? I'm not adverse to using third-party components if required, free or otherwise.

Ideally, this would work in Delphi 7.

Update: Besides the answers below, which work very well, I found that the TMS TAdvSmoothSplashScreen component also handles this task very well, if somewhat more complex.

解决方案

Tim, I just tried this on Vista/D2007 with 'Windows Classic' theme selected:

Alpha Blended Splash Screen in Delphi - Part 2 http://melander.dk/articles/alphasplash2/2/

no black background that I could see... it still looks great.

这篇关于淡化Delphi中的Alpha混合PNG格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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