UEZ Posted July 31, 2008 Share Posted July 31, 2008 (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 March 24, 2009 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
smashly Posted July 31, 2008 Share Posted July 31, 2008 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. Link to comment Share on other sites More sharing options...
UEZ Posted July 31, 2008 Author Share Posted July 31, 2008 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 itsarea 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now