ioa747 Posted July 16 Posted July 16 56 minutes ago, argumentum said: Same, no WorkerW I don't have it under Program Manager either. In the main window, sort them by class and go down to WorkerW to see if you have it Me with the Win10 22H2 i have 21 WorkerW I know that I know nothing
argumentum Posted July 16 Posted July 16 I saw 1 under explorer.exe an was hidden. Didn't try elsewhere because am busy and the problem is in Win11 24H2 anyway. ioa747 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Popular Post Nine Posted July 16 Popular Post Posted July 16 (edited) Hey, got it working on Win10. Never expected it. Found some code about forcing the creation of a WorkerW handle. Let's see if it does the job for your too. expandcollapse popup#include <WinAPI.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> Opt("MustDeclareVars", True) HotKeySet("{ESC}", Terminate) Example() Func Example() Local $hProgman = WinGetHandle("[CLASS:Progman]") _SendMessage($hProgman, 0x052c) ; <<<<<< force the creation of a WorkerW handle under Progman Local $aList = WinList(), $hWorkerW For $i = 1 To $aList[0][0] If _WinAPI_GetParent($aList[$i][1]) = $hProgman And _WinAPI_GetClassName($aList[$i][1]) = "WorkerW" Then $hWorkerW = $aList[$i][1] ExitLoop EndIf Next ConsoleWrite("WorkerW " & $hWorkerW & @CRLF) Local $hGUI = GUICreate("Overlay", 400, 300, 10, 10, $WS_POPUP, $WS_EX_TOOLWINDOW) GUICtrlCreatePic("C:\Program Files (x86)\AutoIt3\Examples\GUI\msoobe.jpg", 0, 0, 400, 300) _WinAPI_SetParent($hGUI, $hWorkerW) _WinAPI_SetWindowLong($hGUI, $GWL_EXSTYLE, BitOR(_WinAPI_GetWindowLong($hGUI, $GWL_EXSTYLE), $WS_EX_LAYERED)) _WinAPI_SetLayeredWindowAttributes($hGUI, 0, 180) GUISetState(@SW_SHOWNOACTIVATE) While Sleep(100) WEnd EndFunc ;==>Example Func Terminate() Exit EndFunc ;==>Terminate Edited July 16 by Nine argumentum, spudw2k, ioa747 and 2 others 5 “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
argumentum Posted July 16 Posted July 16 8 minutes ago, Nine said: Hey, got it working on Win10. and Win11 24H2. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
argumentum Posted July 16 Posted July 16 (edited) 1 hour ago, argumentum said: and Win11 24H2. ..am running 10 PCs, mostly in RDP, and in some it works but in some it doesn't. Any idea of what pre-requisite is needed ? 🤷♂️ Edit: ... If Not $hWorkerW Then Local $aChildWindows = _WinAPI_EnumChildWindows($hProgman) ;_ArrayDisplay($aChildWindows, '_WinAPI_EnumChildWindows') For $n = 1 To UBound($aChildWindows) -1 If $aChildWindows[$n][1] = "WorkerW" Then $hWorkerW = $aChildWindows[$n][0] Next EndIf ... This way works. When WinList() didn't find it, _WinAPI_EnumChildWindows() did. Edit #2 ... If Not $hWorkerW Then ConsoleWrite(@CRLF) Local $aEnumWindows = _WinAPI_EnumWindows(False) For $n = 1 To UBound($aEnumWindows) -1 If $aEnumWindows[$n][1] <> "WorkerW" Then ContinueLoop ConsoleWrite('>' & _WinAPI_GetClassName(_WinAPI_GetParent($aEnumWindows[$n][0])) & '<' & @CRLF) ; >Progman< If _WinAPI_GetParent($aEnumWindows[$n][0]) = $hProgman Then $hWorkerW = $aEnumWindows[$n][0] ConsoleWrite('- ' & $aEnumWindows[$n][0] & @TAB & '>' & $aEnumWindows[$n][1] & '<' & @CRLF) EndIf Next ConsoleWrite(@CRLF) EndIf ... This seems to work better than any other 🤷♂️ Edited July 16 by argumentum better Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
UEZ Posted July 16 Posted July 16 (edited) I can only test on my Notebook with Win11 24H2 and the solution was to set parent to the WorkerW handle under Progman. I found also the information after midnight to force WorkerW under Progman using DllCall("user32.dll", "lresult", "SendMessage","hwnd", $hProgman, "uint", 0x052C, "wparam", 0, "lparam", 0) but I was too sleepy to continue. expandcollapse popup;Code by UEZ build 2025-07-18 beta #include <WinAPI.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ;~ #include <WinAPIGdi.au3> ;~ #include <Array.au3> Global $aPrimary = GetPrimaryMonitorCoords() If @error Then Exit MsgBox(16, "Error", "Unable to get primary monitor") Global $hProgman = WinGetHandle("[CLASS:Progman]"), $hWorkerW, $i If Not $hProgman Then Exit MsgBox(16, "ERROR", "Couldn't find Progman", 30) _WinAPI_SendMessageTimeout($hProgman, 0x052C, 0, 0, 250, $SMTO_NORMAL) ;~ DllCall("user32.dll", "lresult", "SendMessage","hwnd", $hProgman, "uint", 0x052C, "wparam", 0, "lparam", 0) ;~ Sleep(250) ;~ $i = 1 ;~ While True ;~ $h = WinGetHandle("[CLASS:WorkerW;INSTANCE:" & $i & "]") ;~ $hWorkerW = _WinAPI_FindWindowEx($hProgman, $h, "WorkerW") ;~ If $hWorkerW Then ExitLoop ;~ $i += 1 ;~ If $i = 100 Then Exit MsgBox(16, "ERROR", "Couldn't find WorkerW under Progman", 30) ;~ WEnd Global $hWorkerW = _WinAPI_FindWindowEx($hProgman, 0, "WorkerW", "") If $hWorkerW = 0 Then Exit MsgBox(16, "ERROR", "Couldn't find WorkerW under Progman", 30) Local $aOrigin = GetDesktopOrigin() Local $iX = $aPrimary[0] - $aOrigin[0] Local $iY = $aPrimary[1] - $aOrigin[1] Global $hGUI = GUICreate("GUI behind Desktop icons", $aPrimary[4], $aPrimary[5], $iX, $iY, $WS_POPUP, $WS_EX_TOOLWINDOW) GUICtrlCreatePic("C:\Program Files (x86)\AutoIt3\Examples\GUI\msoobe.jpg", 0, 0, $aPrimary[4], $aPrimary[5]) _WinAPI_SetParent($hGUI, $hWorkerW) _WinAPI_SetWindowPos($hGUI, $HWND_BOTTOM, 0, 0, 0, 0, BitOR($SWP_NOMOVE, $SWP_NOSIZE, $SWP_NOACTIVATE)) _WinAPI_SetWindowLong($hGUI, $GWL_EXSTYLE, BitOR(_WinAPI_GetWindowLong($hGUI, $GWL_EXSTYLE), $WS_EX_LAYERED, $WS_EX_TRANSPARENT)) _WinAPI_SetLayeredWindowAttributes($hGUI, 0, 220, $LWA_ALPHA) GUISetState(@SW_SHOWNOACTIVATE, $hGUI) While GUIGetMsg() <> $GUI_EVENT_CLOSE WEnd Func _WinAPI_FindWindowEx($hParent, $hAfter, $sClass, $sTitle = "") Local $ret = DllCall("user32.dll", "hwnd", "FindWindowExW", "hwnd", $hParent, "hwnd", $hAfter, "wstr", $sClass, "wstr", $sTitle) If @error Or Not IsArray($ret) Then Return 0 Return $ret[0] EndFunc ;==>_WinAPI_FindWindowEx Func GetPrimaryMonitorCoords() Local $tPoint = DllStructCreate("int x;int y") $tPoint.x = 0 $tPoint.y = 0 Local $hMonitor = _WinAPI_MonitorFromPoint($tPoint, $MONITOR_DEFAULTTOPRIMARY) If Not $hMonitor Then Return SetError(1, 0, 0) Local $tMI = DllStructCreate("dword cbSize;long rcMonitor[4];long rcWork[4];dword dwFlags") DllStructSetData($tMI, "cbSize", DllStructGetSize($tMI)) Local $aCall = DllCall("user32.dll", "bool", "GetMonitorInfoW", "handle", $hMonitor, "ptr", DllStructGetPtr($tMI)) If @error Or Not $aCall[0] Then Return SetError(2, 0, 0) Local $iLeft = $tMI.rcMonitor(1) Local $iTop = $tMI.rcMonitor(2) Local $iRight = $tMI.rcMonitor(3) Local $iBottom = $tMI.rcMonitor(4) Local $iWidth = $iRight - $iLeft Local $iHeight = $iBottom - $iTop Local $a[6] = [$iLeft, $iTop, $iRight, $iBottom, $iWidth, $iHeight] Return $a EndFunc ;==>GetPrimaryMonitorCoords Func GetDesktopOrigin() Local $minX = 0, $minY = 0, $x, $y Local $i = 0, $tDevice, $aRet, $tDevMode, $aED While True $tDevice = DllStructCreate("dword cb; char DeviceName[32]; char DeviceString[128]; dword StateFlags; char DeviceID[128]; char DeviceKey[128]") $tDevice.cb = DllStructGetSize($tDevice) $aRet = DllCall("user32.dll", "bool", "EnumDisplayDevicesA", "ptr", 0, "dword", $i, "ptr", DllStructGetPtr($tDevice), "dword", 0) If @error Or Not $aRet[0] Then ExitLoop If BitAND($tDevice.StateFlags, 1) Then $tDevMode = DllStructCreate( _ "byte dmDeviceName[32]; word dmSpecVersion; word dmDriverVersion; word dmSize; word dmDriverExtra; dword dmFields;" & _ "long dmPositionX; long dmPositionY; dword dmDisplayOrientation; dword dmDisplayFixedOutput;" & _ "short dmColor; short dmDuplex; short dmYResolution; short dmTTOption; short dmCollate; char dmFormName[32];" & _ "ushort dmLogPixels; dword dmBitsPerPel; dword dmPelsWidth; dword dmPelsHeight;" & _ "dword dmDisplayFlags; dword dmDisplayFrequency; dword dmICMMethod; dword dmICMIntent;" & _ "dword dmMediaType; dword dmDitherType; dword dmReserved1; dword dmReserved2; dword dmPanningWidth; dword dmPanningHeight") $tDevMode.dmSize = DllStructGetSize($tDevMode) $aED = DllCall("user32.dll", "bool", "EnumDisplaySettingsA", "str", $tDevice.DeviceName, "dword", -1, "ptr", DllStructGetPtr($tDevMode)) If Not @error And $aED[0] Then $x = $tDevMode.dmPositionX $y = $tDevMode.dmPositionY If $x < $minX Then $minX = $x If $y < $minY Then $minY = $y EndIf EndIf $i += 1 WEnd Local $a[2] = [$minX, $minY] Return $a EndFunc ;==>GetDesktopOrigin Edited July 18 by UEZ Should support multi monitor environment now WildByDesign, Gianni and Parsix 3 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Parsix Posted July 16 Author Posted July 16 (edited) When Superman comes in. 🤩🥰 Hello and welcome UEZ, you unlocked the problem as always. Edited July 16 by Parsix
Popular Post argumentum Posted July 16 Popular Post Posted July 16 expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Version=Beta #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <WinAPI.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <WinAPISysWin.au3> Opt("MustDeclareVars", True) HotKeySet("{ESC}", Terminate) ;;; https://www.autoitscript.com/forum/topic/212981-move-window-behind-desktop-icons/page/2/#findComment-1544435 Example() Func Example() Local $hWorkerW = 0, $hProgman = _WinAPI_GetShellWindow() ; WinGetHandle("[CLASS:Progman]") ;~ _SendMessage($hProgman, 0x052C) ; <<<<<< force the creation of a WorkerW handle under Progman ; https://stackoverflow.com/questions/56132584/draw-on-windows-10-wallpaper-in-c ; https://stackoverflow.com/questions/34952967/drawing-to-the-desktop-via-injection ; https://github.com/rocksdanister/lively/issues/2074 _WinAPI_SendMessageTimeout($hProgman, 0x052C, 0, 0, 3000, $SMTO_NORMAL) ; same as _SendMessage() If Not $hWorkerW Then ; dah Local $aEnumWindows = _WinAPI_EnumWindows(False) For $n = 1 To UBound($aEnumWindows) - 1 If $aEnumWindows[$n][1] <> "WorkerW" Then ContinueLoop If _WinAPI_GetParent($aEnumWindows[$n][0]) = $hProgman Then $hWorkerW = $aEnumWindows[$n][0] ExitLoop ; but is likely one at the end of the Z-order EndIf Next EndIf ConsoleWrite("WorkerW = " & $hWorkerW & @CRLF) If Not $hWorkerW Then $hWorkerW = $hProgman Local $hGUI = GUICreate("Overlay", 400, 300, 10, 10) ; , $WS_POPUP, $WS_EX_TOOLWINDOW) GUICtrlCreatePic(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1)) & "Examples\GUI\msoobe.jpg", 0, 0, 400, 300) _WinAPI_SetParent($hGUI, $hWorkerW) _WinAPI_SetWindowLong($hGUI, $GWL_EXSTYLE, BitOR(_WinAPI_GetWindowLong($hGUI, $GWL_EXSTYLE), $WS_EX_LAYERED)) _WinAPI_SetLayeredWindowAttributes($hGUI, 0, 180) GUISetState(@SW_SHOWNOACTIVATE) While GUIGetMsg() <> $GUI_EVENT_CLOSE WEnd EndFunc ;==>Example Func Terminate() Exit EndFunc ;==>Terminate My take on the problem is creating "WorkerW". Finding it with _WinAPI_EnumWindows() works best. Reading this github.com/rocksdanister/lively/issues/2074 ( and the projects ) look interesting. Gianni, Parsix, WildByDesign and 2 others 4 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Gianni Posted July 16 Posted July 16 ... Fun topic ... 🙂 just for fun, here are some tweaks to @argumentum's script above to simulate dragging the window and see the visual effect of the movement under the icons...nice effect. To make the window follow the mouse, press F9 once; to stop the movement, press F9 again. expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Version=Beta #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <WinAPI.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <WinAPISysWin.au3> Opt("MustDeclareVars", True) HotKeySet("{ESC}", Terminate) ;;; https://www.autoitscript.com/forum/topic/212981-move-window-behind-desktop-icons/page/2/#findComment-1544435 HotKeySet('{F9}', F9) ; <-- Global $bFlag = False ; <-- Example() Func Example() Local $hWorkerW = 0, $hProgman = _WinAPI_GetShellWindow() ; WinGetHandle("[CLASS:Progman]") ;~ _SendMessage($hProgman, 0x052C) ; <<<<<< force the creation of a WorkerW handle under Progman ; https://stackoverflow.com/questions/56132584/draw-on-windows-10-wallpaper-in-c ; https://stackoverflow.com/questions/34952967/drawing-to-the-desktop-via-injection ; https://github.com/rocksdanister/lively/issues/2074 _WinAPI_SendMessageTimeout($hProgman, 0x052C, 0, 0, 3000, $SMTO_NORMAL) ; same as _SendMessage() If Not $hWorkerW Then ; dah Local $aEnumWindows = _WinAPI_EnumWindows(False) For $n = 1 To UBound($aEnumWindows) - 1 If $aEnumWindows[$n][1] <> "WorkerW" Then ContinueLoop If _WinAPI_GetParent($aEnumWindows[$n][0]) = $hProgman Then $hWorkerW = $aEnumWindows[$n][0] ExitLoop ; but is likely one at the end of the Z-order EndIf Next EndIf ConsoleWrite("WorkerW = " & $hWorkerW & @CRLF) If Not $hWorkerW Then $hWorkerW = $hProgman Local $hGUI = GUICreate("Overlay", 400, 300, 10, 10) ; , $WS_POPUP, $WS_EX_TOOLWINDOW) GUICtrlCreatePic(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1)) & "Examples\GUI\msoobe.jpg", 0, 0, 400, 300) _WinAPI_SetParent($hGUI, $hWorkerW) _WinAPI_SetWindowLong($hGUI, $GWL_EXSTYLE, BitOR(_WinAPI_GetWindowLong($hGUI, $GWL_EXSTYLE), $WS_EX_LAYERED)) _WinAPI_SetLayeredWindowAttributes($hGUI, 0, 180) GUISetState(@SW_SHOWNOACTIVATE) While GUIGetMsg() <> $GUI_EVENT_CLOSE If $bFlag Then WinMove($hGUI,'',MouseGetPos(0),MouseGetPos(1)) EndIf WEnd EndFunc ;==>Example Func Terminate() Exit EndFunc ;==>Terminate Func F9() $bFlag = Not $bFlag EndFunc ioa747, WildByDesign, argumentum and 1 other 4 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
argumentum Posted July 16 Posted July 16 Just now, Gianni said: just for fun, here are some tweaks to @argumentum's script Oh, is not "mine", is basically @Nine's. It works most everywhere, almost !. But I only have so much time and know how. But the more people get involved, the better for this script. Thanks for the tweak Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Parsix Posted July 16 Author Posted July 16 (edited) 33 minutes ago, argumentum said: Oh, is not "mine", is basically @Nine's. It works most everywhere, almost !. But I only have so much time and know how. But the more people get involved, the better for this script. Thanks for the tweak I set a good challenge, it's giving good results I told @UEZ to come, he comes in like Superman 🤣 Edited July 16 by Parsix WildByDesign and argumentum 1 1
UEZ Posted July 17 Posted July 17 (edited) Added an example how to play a webp animation on the desktop background behind the icons -> WebP See WebP Example14.au3. You need beside the appropriate _WebP_x??.dll also "Rostislav Uzunov Animation 480x270@30FPS.webp". Exit of the script only from the taskbar yet. It is very CPU intensive. Edited July 17 by UEZ argumentum and Parsix 2 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Parsix Posted July 21 Author Posted July 21 Windows 10 is OK Windows 11 is OK Is there a solution for Windows 7?
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