Davidyese Posted 4 hours ago Posted 4 hours ago (edited) Dear Experts, Is there anyway to set the display of txt background in Marquee to bee fully transparent when there is image baground used in Gui here is the code : #include <GUIConstantsEx.au3> #include <Marquee.au3> Local $hGui = GUICreate("", 500, 300) GUISetBkColor(1193046, $hGui) GUICtrlCreatePic(@ProgramFilesDir & "\AutoIt3\Examples\GUI\msoobe.jpg", 0, 0, 500, 300) GUICtrlSetState(-1, $GUI_DISABLE) $stext = "«USER Soft 2026» Presents : USER Assist Tool ... «USER Soft 2026» Presents : USER Assist Tool ..." ;$imarqueeindex = _guictrlmarquee_init() _GUICtrlMarquee_SetScroll(0, Default, "left", Default, 200) _GUICtrlMarquee_SetDisplay(1, "White", 1193046, 12, "Arial") ; Change backgtound color _GUICtrlMarquee_Create($stext, 15, 85, 400, 25) ; Change position GUISetState() While True If GUIGetMsg()=-3 Then Exit WEnd to retrieve the marquee.au3 UDF created by : Melba23 used from here : https://www.autoitscript.com/forum/topic/103904-info-bar-like-tickertape/#findComment-735769 we need to set txt to scroll freely with transparent background (means the gui .jpg image will apperar under the Marquee txt in Marquee) Thanks in advance Edited 4 hours ago by Davidyese
Nine Posted 3 hours ago Posted 3 hours ago Well, the code does not work anymore in Windows 11 (at least for me). But I had this code written back then...You may have some use of it. expandcollapse popup; From Nine #include <GUIConstants.au3> #include <WinAPISysWin.au3> Global $iLen, $idLabel Example() Func Example() Local $hGUI = GUICreate("Maquee", 500, 300) GUISetBkColor(1193046, $hGUI) GUICtrlCreatePic(@ProgramFilesDir & "\AutoIt3\Examples\GUI\msoobe.jpg", 0, 0, 500, 300) GUICtrlSetState(-1, $GUI_DISABLE) Local $sString = "«USER Soft 2026» Presents : USER Assist Tool ..." GUISetState() Local $hGUI2 = GUICreate("", 300, 30, 100, 100, $WS_POPUP, BitOR($WS_EX_COMPOSITED, $WS_EX_MDICHILD, $WS_EX_LAYERED), $hGUI) GUISetBkColor(0xABCDEF) GUISetFont(14) $sString &= " " $idLabel = GUICtrlCreateLabel($sString, 0, -30, -1, 30, $SS_NOPREFIX + $SS_LEFTNOWORDWRAP) $iLen = ControlGetPos($hGUI2, "", $idLabel)[2] - 9 ; to get exact length GUICtrlDelete($idLabel) $idLabel = GUICtrlCreateLabel($sString & $sString, 0, 0, $iLen * 2, 30, BitOR($SS_NOPREFIX, $SS_LEFTNOWORDWRAP)) GUICtrlSetColor(-1, 0xFFFFFF) _WinAPI_SetLayeredWindowAttributes($hGUI2, 0xABCDEF) GUISetState() Local $hTimerProc = DllCallbackRegister(Scroll, 'none', 'hwnd;uint;uint_ptr;dword') Local $iTimerID = _WinAPI_SetTimer($hGUI, 0, 25, DllCallbackGetPtr($hTimerProc)) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE _WinAPI_KillTimer($hGUI, $iTimerID) DllCallbackFree($hTimerProc) EndFunc ;==>Example Func Scroll($hWnd, $iMsg, $iTimerID, $iTime) Local Static $iPos = 0 $iPos -= 1 If -$iPos = $iLen Then $iPos = 0 GUICtrlSetPos($idLabel, $iPos) EndFunc ;==>Scroll “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) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
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