Exemplo n.º 1
0
        public static void WallPaper(Window window)
        {
            FullScreenUtils.GoFullscreen(window);

            IntPtr i = new WindowInteropHelper(window).Handle;

            WinRef.SetParent(i, GetProgman());
        }
Exemplo n.º 2
0
        public static IntPtr GetFolder()
        {
            IntPtr sdll = IntPtr.Zero;

            WinRef.EnumWindows(delegate(IntPtr tophandle, IntPtr topparamhandle)
            {
                IntPtr shelldll = WinRef.FindWindowEx(tophandle, IntPtr.Zero, "SHELLDLL_DefView", null);
                if (shelldll != IntPtr.Zero)
                {
                    sdll = shelldll;
                }
                return(true);
            }, IntPtr.Zero);
            return(WinRef.FindWindowEx(sdll, IntPtr.Zero, "SysListView32", null));
        }
Exemplo n.º 3
0
        private static IntPtr GetProgman()
        {
            IntPtr windowHandle = WinRef.FindWindow("Progman", null);

            WinRef.SendMessageTimeout(windowHandle, 0x52c, new IntPtr(0), IntPtr.Zero, WinRef.SendMessageTimeoutFlags.SMTO_NORMAL, 0x3e8, out IntPtr zero);
            IntPtr workerw = IntPtr.Zero;

            WinRef.EnumWindows(delegate(IntPtr tophandle, IntPtr topparamhandle)
            {
                if (WinRef.FindWindowEx(tophandle, IntPtr.Zero, "SHELLDLL_DefView", null) != IntPtr.Zero)
                {
                    workerw = WinRef.FindWindowEx(IntPtr.Zero, tophandle, "WorkerW", null);
                }
                return(true);
            }, IntPtr.Zero);
            WinRef.ShowWindow(workerw, WinRef.SW_HIDE);
            return(windowHandle);
        }