I created a library which lets you move any window behind the desktop icons using the user32.dll
, but the problem is that the window doesn't react neither to clicks or key presses (even KeyboardDevice didn't seem to capture anything)'
One thing to note though is that after I make any window run on that wallpaper layer, it disappears from the task bar.
This is the code:
public static void MoveBehindIcons(IntPtr windowHandle)
{
IntPtr window = W32.FindWindow("Progman", (string) null);
IntPtr result = IntPtr.Zero;
int num1 = 1324;
IntPtr wParam = new IntPtr(0);
IntPtr zero = IntPtr.Zero;
int num2 = 0;
int num3 = 1000;
W32.SendMessageTimeout(window, (uint) num1, wParam, zero, (W32.SendMessageTimeoutFlags) num2, (uint) num3, out result);
IntPtr workerw = IntPtr.Zero;
W32.EnumWindows((W32.EnumWindowsProc) ((tophandle, topparamhandle) =>
{
if (W32.FindWindowEx(tophandle, IntPtr.Zero, "SHELLDLL_DefView", IntPtr.Zero) != IntPtr.Zero)
workerw = W32.FindWindowEx(IntPtr.Zero, tophandle, "WorkerW", IntPtr.Zero);
return true;
}), IntPtr.Zero);
W32.SetParent(windowHandle, workerw);
}
the W32 class: https://pastebin.com/Tw72Lbw6
WallpaperEngine can do it somehow..
Is it possible to make it work?