Jump to content
Sign in to follow this  
health

trouble with WS_EX_LAYERED, .gif and WinSetTrans

Recommended Posts

health

I have a GUI with WS_EX_LAYERED and a .gif in this GUI as the background... the gif is transparent and constitutes the GUI.

But when I'm changing the transparency of the gui with WinSetTrans, the gif will be non-transparent. the background of the gif will be simply white and this is not what I want.

How I fix that?

Share this post


Link to post
Share on other sites
rasim

I have a GUI with WS_EX_LAYERED and a .gif in this GUI as the background... the gif is transparent and constitutes the GUI.

But when I'm changing the transparency of the gui with WinSetTrans, the gif will be non-transparent. the background of the gif will be simply white and this is not what I want.

How I fix that?

Works fine for me:

#include <GuiConstants.au3>

$hGUI = GUICreate("Test GUI", 300, 200, -1, -1, -1, $WS_EX_LAYERED)

$hPic = GUICtrlCreatePic(@ScriptDir & "\test.gif", 10, 10, 280, 180)
GUICtrlSetState(-1, $GUI_DISABLE)

GUISetState()

For $i = 255 To 0 Step -1
    WinSetTrans($hGUI, "", $i)
    Sleep(100)
Next

Do
Until GUIGetMsg() = -3

test.zip

Share this post


Link to post
Share on other sites
health

hey rasim,

the gif has transparency! when I'm changing the transparency of the win with winsettrans then the transparency of the gif goes away. this is my problem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.