title: A generic error in GDI+ with ToolStrip in ManagerRenderMode
body: <p>I have a vb.net form with ToolStrip menu</p>
  
  <pre><code>RenderMode - ManagerRenderMode
  LayoutStyle - HorizontalStackWithOverflow
  </code></pre>
  
  <p>My development environment is .net 4.0, VS2010, windows 7 x64; but occasionally I am getting next error <img src="https://i.stack.imgur.com/W3uLm.png" alt="error"></p>
  
  <pre><code>A generic error occurred in GDI+.
  Stacktrace:   at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
     at System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y, Int32 width, Int32 height)
     at System.Drawing.Graphics.FillRectangle(Brush brush, Rectangle rect)
     at System.Windows.Forms.ToolStripProfessionalRenderer.FillWithDoubleGradient(Color beginColor, Color middleColor, Color endColor, Graphics g, Rectangle bounds, Int32 firstGradientWidth, Int32 secondGradientWidth, LinearGradientMode mode, Boolean flipHorizontal)
     at System.Windows.Forms.ToolStripProfessionalRenderer.RenderToolStripBackgroundInternal(ToolStripRenderEventArgs e)
     at System.Windows.Forms.ToolStripProfessionalRenderer.OnRenderToolStripBackground(ToolStripRenderEventArgs e)
     at System.Windows.Forms.ToolStripRenderer.DrawToolStripBackground(ToolStripRenderEventArgs e)
     at System.Windows.Forms.ToolStrip.OnPaintBackground(PaintEventArgs e)
     at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
     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)
     at System.Windows.Forms.ToolStrip.WndProc(Message&amp; m)
     at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
     at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
     at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  </code></pre>