/// <summary> /// This method retrieves the update region of a control. /// </summary> /// <param name="control">The control to retrieve the update region for.</param> /// <returns> /// An array of rectangles specifying the area that has been invalidated, or /// null if this could not be determined. /// </returns> /// <remarks> /// This method is not thread safe. /// Note to implementors: This method may be implemented as a no-op. In this case, just return null. /// </remarks> public static Rectangle[] GetUpdateRegion(Control control) { SafeNativeMethods.GetUpdateRgn(control.Handle, hRgn, false); PdnGraphics.GetRegionScans(hRgn, out Rectangle[] scans, out int area); GC.KeepAlive(control); return(scans); }