title: Windows 7 TextureBrush..ctor() error
body: <p>I have a .NET 2.0 app that runs just fine on XP and Vista, but on Windows 7 RC (x64) it crashes with the following error:</p>
  
  <p>Exception Information</p>
  
  <hr>
  
  <p>Exception Type: System.OutOfMemoryException
  Message: Out of memory.
  Data: System.Collections.ListDictionaryInternal
  TargetSite: Void .ctor(System.Drawing.Image, System.Drawing.Drawing2D.WrapMode)
  HelpLink: NULL
  Source: System.Drawing</p>
  
  <p>StackTrace Information</p>
  
  <hr>
  
  <p>at System.Drawing.TextureBrush..ctor(Image image, WrapMode wrapMode)
  at System.Windows.Forms.ControlPaint.DrawBackgroundImage(Graphics g, Image backgroundImage, Color backColor, ImageLayout backgroundImageLayout, Rectangle bounds, Rectangle clipRect, Point scrollOffset, RightToLeft rightToLeft)
  at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle, Color backColor, Point scrollOffset)
  at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle)
  at System.Windows.Forms.Control.OnPaintBackground(PaintEventArgs pevent)
  at System.Windows.Forms.ScrollableControl.OnPaintBackground(PaintEventArgs e)
  at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
  at System.Windows.Forms.Control.WmPaint(Message&amp; m)
  at System.Windows.Forms.Control.WndProc(Message&amp; m)
  at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)</p>
  
  <p>Any ideas about why this is happening, or how I might program around it? It's just painting a standard winform with no special background.</p>
  
  <p>UPDATE:
  I've found that this is only an issue when the BackgroundImageLayout = ImageLayout.Tile, which is also the default. Set it to Zoom or Center, and the issue dissapears. That's pretty unsatisfactory though, because I need it to tile.</p>