Melque_Lima Posted November 3, 2016 Share Posted November 3, 2016 hi guys! is possible to set the label opacity? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 3, 2016 Moderators Share Posted November 3, 2016 Melque_Lima, I would suggest using a child GUI like this: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("Test", 500, 500) GUICtrlCreateLabel("XXXXXXXXXXXXX", 0, 0, 200, 40) GUICtrlSetFont(-1, 24) $cSlider = GUICtrlCreateSlider(10, 200, 200, 20) GUICtrlSetLimit($cSlider, 255) GUICtrlSetData($cSlider, 255) GUISetState() $hChild = GUICreate("Test", 190, 20, 5, 5, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) $cLabel = GUICtrlCreateLabel("OOOOOOOOOOOOOOOO", 0, 0, 190, 20) GUICtrlSetBkColor($cLabel, 0xFFCCCC) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cSlider $iLevel = GUICtrlRead($cSlider) ConsoleWrite($iLevel & @CRLF) WinSetTrans($hChild, "", $iLevel) EndSwitch WEnd M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Melque_Lima Posted November 3, 2016 Author Share Posted November 3, 2016 (edited) 1 hour ago, Melba23 said: this code works!!, but mine below doesnt why? expandcollapse popup#AutoIt3Wrapper_Add_Constants=n #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiImageList.au3> #include <GuiButton.au3> #include <GuiListView.au3> #include <FontConstants.au3> #include <Misc.au3> #include <GuiTreeView.au3> #include "OnEventFunc.au3" Opt("GUIOnEventMode", 1);<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ;Opt("GUICloseOnESC", 1) ;~ HotKeySet("+!d",'Modo_ADM') HotKeySet("{DEL}", "deleta") $imagens = @ScriptDir & '\' & "gradient.bmp" Global $fDblClk = False Global $aLV_Click_Info, $hTmp_Edit = 0 $dll = DllOpen("user32.dll") #region configuração de form $x = 1000 $y = 600 $w =(@DesktopWidth/2)-($x/2) $h =(@DesktopHeight/2)-($y/2) Global $Form_tabela = GUICreate("Imagens", $x, $y, $w, $h,BitOR($WS_POPUP, $DS_SETFOREGROUND)) GUISetBkColor(0x505050) GUICtrlSetDefColor(0xc1c1c1) #EndRegion #Region botoes de comando da janela $x_label = GUICtrlCreateLabel("X", $x - 30, 10, 20, 20, BitOr($SS_NOTIFY, $SS_CENTER, $SS_CENTERIMAGE, $SS_SUNKEN)) ;GUISetOnEvent($GUI_EVENT_CLOSE, "close_x") GUICtrlSetOnEvent(-1, "close_x") GUICtrlSetBkColor(-1, 0x414141) $ctrlpos = ControlGetPos($Form_tabela, "", $x_label) GUICtrlCreatePic($imagens, $ctrlpos[0],$ctrlpos[1], $ctrlpos[2],$ctrlpos[3]) #EndRegion #Region Outros GUICtrlCreateLabel("-- Fotos de Clientes --", 10, 40, $x-20, 30, BitOr($SS_NOTIFY, $SS_CENTER, $SS_CENTERIMAGE, $SS_SUNKEN)) GUICtrlSetBkColor(-1, 0x991010) GUICtrlSetFont (-1,15,$FW_HEAVY) #EndRegion $x_img_bck = $x-20 dim $legendas[10] = ["a","b","c","d","e","f","g","h","i","j"] $j = 0 GUICtrlCreateLabel("", 10,90, $x-20,400) GUICtrlSetBkColor(-1, 0x414141) for $i = 25 to 809 step 191 GUICtrlCreateLabel("", $i,110, 186 ,150, BitOr($SS_CENTER, $SS_CENTERIMAGE)) GUICtrlSetBkColor(-1, 0xfff200) GUICtrlSetState(-1,$GUI_HIDE) $a = GUICtrlCreateLabel("", $i+1,111, 184 ,148, BitOr($SS_CENTER, $SS_CENTERIMAGE)) GUICtrlSetBkColor(-1, 0x991010) WinSetTrans($a, "", 50) ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< HERE GUICtrlCreateLabel($legendas[$j], $i+1,241, 184 ,18, BitOr($SS_CENTER, $SS_CENTERIMAGE)) GUICtrlSetBkColor(-1, 0x686d89) GUICtrlSetFont (-1,12,$FW_HEAVY) $j = $j +1 Next for $i = 25 to 809 step 191 GUICtrlCreateLabel("", $i,265, 186 ,150, BitOr($SS_CENTER, $SS_CENTERIMAGE)) GUICtrlSetBkColor(-1, 0x991010) GUICtrlCreateLabel($legendas[$j], $i,395, 186 ,20, BitOr($SS_CENTER, $SS_CENTERIMAGE)) GUICtrlSetBkColor(-1, 0x686d89) GUICtrlSetFont (-1,12,$FW_HEAVY) $j = $j +1 Next GUISetState(@SW_SHOW,$Form_tabela) while(1) sleep(20) WEnd line with coment: "<<<<<<<<<<<<<<<<<<<<<<HERE" Edited November 3, 2016 by Melba23 Removed quote Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 3, 2016 Moderators Share Posted November 3, 2016 Melque_Lima, When you reply, please use the "Reply to this topic" button at the top of the thread or the "Reply to this topic" editor at the bottom rather than the "Quote" button - I know what I wrote and it just pads the thread unnecessarily. As to why the code does not work - look at the required parameters of the WinSetTrans function and then re-read what I explained to you in this thread about the difference between ControlIDs and handles. Why do you think I went to the trouble of creating a child GUI if it was as easy as you want it to be? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Melque_Lima Posted November 3, 2016 Author Share Posted November 3, 2016 niece i set here and works, sorry for the "quote" 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