charvi Posted December 16, 2008 Share Posted December 16, 2008 Big problem here. The labeltext is not transparent at the second level, in the function _Popup_ in the example. Question: How to make it transparent like in first level ? expandcollapse popup; ## System File includes ========================================================== #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiStatusBar.au3> #include <GuiEdit.au3> #include <GuiMenu.au3> #include <GuiToolBar.au3> #include <GuiComboBoxEx.au3> #include <Array.au3> #include <Constants.au3> #include <WinAPI.au3> #include <File.au3> #include <Misc.au3> #include <GDIPlus.au3> #include <Color.au3> #include <INet.au3> #include <Memory.au3> _MLSAU_() ;=================================================================== Func _MLSAU_() ; Main Program declarations Global $h_WinMain, $h_Pic Local $Msg, $l $h_WinMain = GUICreate("TEST", 500, 500, 0, 0) GUISetBkColor(0x838b83, $h_WinMain) $h_Pic = GUICtrlCreatePic(@ScriptDir & "\images\logo4.gif",0,0,169,68) GUISetState() $l = GUICtrlCreateLabel("This message is transparent.", 0, 0, 300, 15) GUICtrlSetBkColor($l, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetColor($l, 0xff0000) _Popup_() While 1 $Msg = GUIGetMsg() Select Case $Msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd EndFunc ;==================================================================== func _Popup_() Local $h_Popup, $lp, $Msg $h_Popup = GUICreate("", 500, 500, 0, 0, $WS_POPUP, $ws_ex_transparent, $h_WinMain) GUISetState() $lp = GUICtrlCreateLabel("Message in popup, should be transparent too.", 5, 60, 300, 15) GUICtrlSetBkColor($lp, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetColor($lp, 0xff0000) While 1 $Msg = GUIGetMsg() Select Case $Msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete($h_Popup) EndFunc Link to comment Share on other sites More sharing options...
Zedna Posted December 16, 2008 Share Posted December 16, 2008 $h_Popup = GUICreate("", 500, 500, 0, 0, $WS_POPUP, $ws_ex_transparent, $h_WinMain) $lp = GUICtrlCreateLabel("Message in popup, should be transparent too.", 5, 60, 300, 15) GUICtrlSetBkColor($lp, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetColor($lp, 0xff0000) GUISetState() You had GUISetState() at wrong place, Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
charvi Posted December 16, 2008 Author Share Posted December 16, 2008 $h_Popup = GUICreate("", 500, 500, 0, 0, $WS_POPUP, $ws_ex_transparent, $h_WinMain) $lp = GUICtrlCreateLabel("Message in popup, should be transparent too.", 5, 60, 300, 15) GUICtrlSetBkColor($lp, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetColor($lp, 0xff0000) GUISetState() You had GUISetState() at wrong place,Indeed, thanks Zedna. But why is the second label not over the picture? Do we need WM_PAINT here too, to have the same effect as the first label? 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