internal static void WindowAction(String title, IntPtr action) { IntPtr appHwnd; Windowplacement wp = new Windowplacement(); appHwnd = (IntPtr)FindWindow(null, title); GetWindowPlacement(appHwnd, ref wp); wp.ShowCmd = action; // 1- Normal; 2 - Minimize; 3 - Maximize; SetWindowPlacement(appHwnd, ref wp); }
internal static extern Boolean SetWindowPlacement(IntPtr hWnd, ref Windowplacement lpwndpl);