static IntPtr GetWindowStyles(IntPtr hWnd, int nIndex) { return(Win32.GetWindowLongPtr(hWnd, nIndex)); }
static void SetWindowStyleOff(IntPtr hWnd, int nIndex, long dwStylesToOff) { IntPtr windowStyles = GetWindowStyles(hWnd, nIndex); Win32.SetWindowLongPtr(hWnd, nIndex, ((windowStyles.ToInt64() | dwStylesToOff) ^ dwStylesToOff)); }
static void MinimizeWindow(IntPtr hWnd) { Win32.ShowWindow(hWnd, Win32.SW_MINIMIZE); }
static void MaximizeWindow(IntPtr hWnd) { Win32.ShowWindow(hWnd, Win32.SW_MAXIMIZE); }
static void SetWindowFullscreen(IntPtr hWnd) { Rectangle rect = Screen.FromHandle(hWnd).Bounds; Win32.SetWindowPos(hWnd, hWnd, rect.X, rect.Y, rect.Width, rect.Height, Win32.SWP_SHOWWINDOW | Win32.SWP_FRAMECHANGED); }