Jump to content

trouble with WS_EX_LAYERED, .gif and WinSetTrans


health
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...