[DllImport("gdi32.dll")] static extern int GetRandomRgn(IntPtr hdc, IntPtr hrgn, int iNum); // // Possible iNum values. // // 1=DC's Clip Region // 2=DC's Meta Region // 3=DC's Intersection of 1 and 2 // 4=System Region //Once you have your clip region you can the use the GetRegionData() function to get at the individual rectangles that make up the region.