Exemple #1
0
 /// <summary>
 /// Specifies that only a portion of the window's client area
 /// should be used in the window's thumbnail.
 /// </summary>
 /// <param name="hwnd">The window.</param>
 /// <param name="clipRect">The rectangle that specifies the clipped region.</param>
 public static void SetThumbnailClip(IntPtr hwnd, Rectangle clipRect)
 {
     RECT rect = new RECT(clipRect.Left, clipRect.Top, clipRect.Right, clipRect.Bottom);
     TaskbarList.SetThumbnailClip(hwnd, ref rect);
 }
Exemple #2
0
 public static bool GetClientSize(IntPtr hwnd, out System.Drawing.Size size)
 {
     RECT rect = new RECT();
     if (!GetClientRect(hwnd, ref rect))
     {
         size = new System.Drawing.Size(-1, -1);
         return false;
     }
     size = new System.Drawing.Size(rect.right, rect.bottom);
     return true;
 }
Exemple #3
0
 public static extern bool GetWindowRect(IntPtr hwnd, ref RECT rect);
Exemple #4
0
 public static extern bool GetClientRect(IntPtr hwnd, ref RECT rect);