private void CreateRegion(Rectangle rect) { Debug.Assert(_nativeHandle == IntPtr.Zero, "nativeHandle should be null, we're leaking handle"); _nativeHandle = IntSafeNativeMethods.CreateRectRgn(rect.X, rect.Y, rect.X + rect.Width, rect.Y + rect.Height); _ownHandle = true; }
private void CreateRegion(Rectangle rect) { this.nativeHandle = IntSafeNativeMethods.CreateRectRgn(rect.X, rect.Y, rect.X + rect.Width, rect.Y + rect.Height); this.ownHandle = true; }