Jump to content

GUICtrlCreatePic with transparent GIF


yawoo
 Share

Recommended Posts

did you did the help recommendation

To have a transparent picture it is needed to use a .gif image with the transparency color set and to create the window with WS_EX_LAYERED extended style.

It is always a good idea you post a simplified script that reproduce your problem B)

Link to comment
Share on other sites

did you did the help recommendation

It is always a good idea you post a simplified script that reproduce your problem B)

Sorry, no coding posted, since my coding is too complex and long to post here.

If attribute $WS_EX_LAYERED is applied to GUICreate(), it will cause the whole windows transparent to

the windows OS, rather than the image transparent to the windows created by Autoit.

But if I use GUICtrlCreateIcon, it can make the icon picture transparent to the windows created by Autoit.

Edited by yawoo
Link to comment
Share on other sites

You cannot use a GUICtrlCreateIcon to load a .gif you need to converted it to an .ico format. B)

Thanks for your information.

The problem I got is that I can use GUICtrlCreateIcon to load transparent .ico file, while using

GUICtrlCreatePic to load transparent .gif file, it cannot show the transparent effect properly.

Link to comment
Share on other sites

Thanks for your information.

The problem I got is that I can use GUICtrlCreateIcon to load transparent .ico file, while using

GUICtrlCreatePic to load transparent .gif file, it cannot show the transparent effect properly.

True you have to use .ico format if you want transparency with a control on a specific GUI.

Edit:If somebody have good idea how to extend the transparency on pic control, I will be glad to work on it. B)

Edited by jpm
Link to comment
Share on other sites

hmmm you are right. it works (for me) on Win XP without $WS_EX_TRANSPARENT. on windows 2000... no luck yet.

Lar.

in fact this is all I need to work on XP...

#include <GUIConstants.au3>

$gui = GUICreate("Blanky")
GUISetBkColor(0)
$smurf = GUICtrlCreatePic(".\smurf.gif",0,0,113,153)

GUISetState()
Sleep(3000)

GUIDelete($gui)

$gui = GUICreate("Blanky")
GUISetBkColor(0xFFFFFF)
$smurf = GUICtrlCreatePic(".\smurf.gif",0,0,113,153)

GUISetState()
Sleep(3000)
Unless i didn't catch the right .gif It does work for me under XP/Sp2 with classic theme B)

Edit I confirm it is working with XP Theme!!! Can somebody tell what can be the difference? :o

Edited by jpm
Link to comment
Share on other sites

try something that seems to worked using bmp

1. save the image under PNG

2. open the image using mspaint and save it as 24 bit bmp

3. try loading in place of the gif

works for me

p/s :

- ignore the funky color spits out by mspaint

- picked the tip up from a vb help site

- it might not be gif but .... B)

- i don't think gif transparent is design to work on app form

maybe later version of autoit could include library such as

http://www.soft-gems.net/Graphics.php

Edited by DiskAI

i think

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...