示例#1
0
 static IntPtr GetWindowStyles(IntPtr hWnd, int nIndex)
 {
     return(Win32.GetWindowLongPtr(hWnd, nIndex));
 }
示例#2
0
        static void SetWindowStyleOff(IntPtr hWnd, int nIndex, long dwStylesToOff)
        {
            IntPtr windowStyles = GetWindowStyles(hWnd, nIndex);

            Win32.SetWindowLongPtr(hWnd, nIndex, ((windowStyles.ToInt64() | dwStylesToOff) ^ dwStylesToOff));
        }
示例#3
0
 static void MinimizeWindow(IntPtr hWnd)
 {
     Win32.ShowWindow(hWnd, Win32.SW_MINIMIZE);
 }
示例#4
0
 static void MaximizeWindow(IntPtr hWnd)
 {
     Win32.ShowWindow(hWnd, Win32.SW_MAXIMIZE);
 }
示例#5
0
        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);
        }