Exemplo n.º 1
0
        public int StopWindowAlwaysOnTop(int windowHandle)
        {
            Console.WriteLine(windowHandle);
            var isSuccessful = WindowsFunctions.SetWindowPos(
                new IntPtr(windowHandle),
                (IntPtr)WindowsFunctions.SpecialWindowHandles.HWND_TOP,
                0,
                0,
                0,
                0,
                WindowsFunctions.SetWindowPosFlags.SWP_NOMOVE | WindowsFunctions.SetWindowPosFlags.SWP_NOSIZE
                );

            return(!isSuccessful?Marshal.GetLastWin32Error() : 0);
        }