Sign in to follow this  
Followers 0
Datus

Icon creation background black[Solved]

2 posts in this topic

#1 ·  Posted (edited)

I have a strange problem that if I create an icon on my main window it shows the transparancy as black and not white which the main window has been set to.

I use

$x=GUICtrlCreateIcon("iconname.ico",1,x,y,size,size);which shows black background

but if I follow with

GUICtrlSetImage($x,"iconname.ico",1);with the same icons it shows white.

If I do the above I get a flicker so didnt really want to resort to that.

Ive been throught code commenting out picture drawing etc and anything that may have black in it but no luck.

If I create a small program with just a main window the icon is fine.

What Im looking for is any tips I can try which I may not have already tried.

Edited by Datus

We live as we dream alone!

Share this post


Link to post
Share on other sites

ive sort of found out why it was doing it.

When I delete a control id it went black.

Tried to replicate it on a smaller bit of code but couldnt so I guess theres some strange stuff happening at the that time that is affecting it.

I was calling a func in my code so I fixed it by creating the icon before the call.

I dont use local global values etc as I dont understand them so maybe that has something to do with it.

Anyway its working now.


We live as we dream alone!

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  
Followers 0