Sign in to follow this  
Followers 0
UEZ

True Transparency - how?

3 posts in this topic

#1 ·  Posted (edited)

Is it possible that a label has true transparency when moving inside a window?

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
HotKeySet("{Esc}", "Quit")

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Test", 633, 445, 193, 125)
$Pic1 = GUICtrlCreatePic(@WindowsDir & "\System32\oobe\msoobe.jpg", 0, 0, 630, 444, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$Label1 = GUICtrlCreateLabel("This is a TEST!!!", 0, 180, 128, 40, BitOR($SS_CENTER, $SS_CENTERIMAGE), BitOR($WS_EX_TRANSPARENT, $WS_EX_STATICEDGE))
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    For $i = 0 To 500
        ControlMove("", "", $Label1, $i, 180)
        Sleep(5)
        
    Next
WEnd

Func Quit()
    GUIDelete()
    Exit 0
EndFunc   ;==>Quit

The label is moving but it contains the area of the background where it has started but I want to see the real backround while moving.

Thanks in advance.

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites



Add a GUICtrlSetImage($Pic1, @WindowsDir & "\System32\oobe\msoobe.jpg") after the ControlMove("", "", $Label1, $i, 180).

Myself I'd look at another method all together as move control in a constant loop is just not cpu friendly or graphically eye pleasing. It causes to much flickering.

Share this post


Link to post
Share on other sites

Add a GUICtrlSetImage($Pic1, @WindowsDir & "\System32\oobe\msoobe.jpg") after the ControlMove("", "", $Label1, $i, 180).

Myself I'd look at another method all together as move control in a constant loop is just not cpu friendly or graphically eye pleasing. It causes to much flickering.

Yes, that way it is working but there must be another method to do it much faster without flickering. Something like that the label is not copying the content of the backround to its

area to simulate transparency.

Maybe alpha channel would help but it is not possible in this way - e.g. in GDI+ it is possible to use alpha channel for transparent effects.


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

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