using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; namespace MinimiseWindow { static class NativeMethods { internal const long WM_SYSCOMMAND = 0x112; internal const long SC_CLOSE = 0xf060; internal const long SC_MAXIMIZE = 0xf030; internal const long SC_MINIMIZE = 0xf020; internal const long SC_RESTORE = 0xf120; /// /// Posts the specified message to a window or windows. /// [DllImport("User32", EntryPoint = "PostMessage")] public static extern IntPtr PostMessage(IntPtr hWnd, long Msg, long wParam, long lParam); } }