123disconnect Posted November 28, 2019 Share Posted November 28, 2019 (edited) Hi, everyone How to set text in Label control is see as clear as when GUi is not transparent. (Google translate) Thank #include <GUIConstantsEx.au3> #include <StaticConstants.au3> $Gui = GUICreate("", 300, 150) $Label = GUICtrlCreateLabel("Text on GUI Tranparent", 50, 30, 200, 25, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont( -1, 14) GUISetState() WinSetTrans($Gui, "", 100) While 1 if GUIGetMsg() = $GUI_EVENT_CLOSE then ExitLoop sleep(10) WEnd Edited November 28, 2019 by 123disconnect Link to comment Share on other sites More sharing options...
SlackerAl Posted November 28, 2019 Share Posted November 28, 2019 (edited) #Include <WindowsConstants.au3> #Include <WinAPI.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> $Gui = GUICreate("", 300, 150, -1, -1, -1, $WS_EX_LAYERED) $Label = GUICtrlCreateLabel("Text on GUI not Tranparent", 50, 30, 200, 25, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUISetBkColor(0x0000FF) _WinAPI_SetLayeredWindowAttributes($Gui, 0x0000FF) GUISetState() While 1 if GUIGetMsg() = $GUI_EVENT_CLOSE then ExitLoop sleep(10) WEnd Edited November 28, 2019 by SlackerAl 123disconnect 1 Problem solving step 1: Write a simple, self-contained, running, replicator of your problem. Link to comment Share on other sites More sharing options...
123disconnect Posted November 29, 2019 Author Share Posted November 29, 2019 21 hours ago, SlackerAl said: #Include <WindowsConstants.au3> #Include <WinAPI.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> $Gui = GUICreate("", 300, 150, -1, -1, -1, $WS_EX_LAYERED) $Label = GUICtrlCreateLabel("Text on GUI not Tranparent", 50, 30, 200, 25, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUISetBkColor(0x0000FF) _WinAPI_SetLayeredWindowAttributes($Gui, 0x0000FF) GUISetState() While 1 if GUIGetMsg() = $GUI_EVENT_CLOSE then ExitLoop sleep(10) WEnd Thank SlackerAl This code , I can search in forum With one GUI only. Can you set background is blur And text on label see as clear label ? Link to comment Share on other sites More sharing options...
SlackerAl Posted November 29, 2019 Share Posted November 29, 2019 (edited) I'm not sure what you are asking for here: 1) Your original post has the whole GUI and contents as transparent 2) My version has the form as transparent and the label as normal. 3) If you want the form less transparent set the value of $iTransGUI to a suitable value in the _WinAPI_SetLayeredWindowAttributes command. 4) When you say "text on label see as clear label" are you saying you don't want to see the label text? (In which case you can just set the text to ""). 5) Can you post an image of what you wish to achieve? 6) Transparent label, solid GUI seems to be covered here: Edited November 29, 2019 by SlackerAl Added 6) 123disconnect 1 Problem solving step 1: Write a simple, self-contained, running, replicator of your problem. Link to comment Share on other sites More sharing options...
Zedna Posted November 29, 2019 Share Posted November 29, 2019 123disconnect 1 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Nine Posted November 29, 2019 Share Posted November 29, 2019 I think he meant something like this : expandcollapse popup#include <GUIConstants.au3> #include <GDIPlus.au3> #include <SendMessage.au3> #include <Constants.au3> #include <ScreenCapture.au3> #include <WinAPISysWin.au3> #include <FontConstants.au3> _GDIPlus_Startup() Local $hGUI = GUICreate("", 300, 200, 150, 150, $WS_POPUP+$WS_BORDER) $hGUI_c = GUICreate("", 200, 100, 100, 50, $WS_POPUP,$WS_EX_LAYERED+$WS_EX_TRANSPARENT+$WS_EX_MDICHILD, $hGUI) GUISetBkColor(0xFFFFFF, $hGUI_c) $idLabel = GUICtrlCreateLabel("This is a test", 0, 0, 100, 30, $SS_CENTER) GUICtrlSetFont (-1, 12, $FW_BOLD) _WinAPI_SetLayeredWindowAttributes($hGUI_c, 0xFFFFFF) Local $iCW = _WinAPI_GetClientWidth($hGUI), $iCH = _WinAPI_GetClientHeight($hGUI) Local $aPos = WinGetPos ($hGUI), $iBorder = Int (($aPos[2]-$iCW)/2), $iTopBorder = $aPos[3]-$iCH-$iBorder Local $hBitmap = _ScreenCapture_Capture("",$aPos[0]+$iBorder, $aPos[1]+$iTopBorder, $aPos[0]+$iBorder+$iCW, $aPos[1]+$iTopBorder+$iCH) Local $hImage = _GDIPlus_BitmapCreateFromHBITMAP ($hBitmap) Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGui) Local $hEffect = _GDIPlus_EffectCreateBlur(5) _GDIPlus_BitmapApplyEffect($hImage, $hEffect) GUISetState(@SW_SHOW, $hGUI) GUISetState(@SW_SHOWNA, $hGUI_c) _GDIPlus_GraphicsDrawImageRect($hGraphics, $hImage, 0, 0, $iCW, $iCH) While True Switch GUIGetMsg () Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd _GDIPlus_GraphicsDispose($hGraphics) _WinAPI_DeleteObject ($hBitmap) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown () “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy 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