Jump to content

Transparent Pic Control Causing Main GUI to be transparent


Recommended Posts

Here is how I have set up my GUI window:

Dim $Main = GUICreate($sTitle & $sVersion, 1025, 769, 193, 125,$WS_CLIPCHILDREN+$WS_SYSMENU+$WS_MINIMIZEBOX+$WS_CLIPSIBLINGS,$WS_EX_LAYERED)
GUISetBkColor(0xFFFFFF,$Main)

and here are my picture controls:

Dim $image1 = GUICtrlCreatePic($sImageLocation & "curve1.gif", 100, 100, 0, 0)
GUICtrlSetOnEvent(-1,"_LeftClick")
Dim $image2 = GUICtrlCreatePic($sImageLocation & "curve2.gif", 125, 125, 0, 0)
GUICtrlSetOnEvent(-1,"_LeftClick")

This shows the result:

The picture controls cause the main GUI to become transparent (you can see the SCITE window behind them). What I would like is for each of the picture controls to be transparent to each other and be able to see the "white" of the main GUI behind them, not cause the Main window to be come transparent as well.

This shows how I would like it to look:

I must be missing something, but I have tried different combinations of different $WS and $WS_EX styles for both the GUI and the PIC controls without success. From what I have read, the main GUI must have $WS_EX_LAYERED style in order for the pictures to have transparency. However, I seem to be missing some command to keep the GUI solid while maintaining the transparency of the picture controls.

Thanks,

Bob

Edited by YellowLab

You can't see a rainbow without first experiencing the rain.

Link to comment
Share on other sites

$WS_POPUP style does not fix the problem.

I have thought about making the pic controls in their own window, but that seems like a lot of extra coding. Any other ideas?

Bob

You can't see a rainbow without first experiencing the rain.

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