コード例 #1
0
ファイル: WindowController.cs プロジェクト: namse/overview
        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);
        }