Odd ThemedSplitContainer Behavior


Author
Message
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
If I minimize a form that has this control on it (orientation: horizontal), then restore the form, I get the following error:


System.ArgumentException was unhandled by user code
  Message="Rectangle '{X=0,Y=70,Width=0,Height=4}' cannot have a width or height equal to 0."
  Source="System.Drawing"
  StackTrace:
       at System.Drawing.Drawing2D.LinearGradientBrush..ctor(Rectangle rect, Color color1, Color color2, LinearGradientMode linearGradientMode)    at MicroFour.StrataFrame.UI.Windows.Forms.ThemedSplitContainer.RenderHorizontalBar(Graphics DrawObj)    at MicroFour.StrataFrame.UI.Windows.Forms.ThemedSplitContainer.OnPaint(PaintEventArgs e)    at System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle, Region transparentRegion)    at System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle)    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.WmEraseBkgnd(Message& m)    at System.Windows.Forms.Control.WndProc(Message& m)    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)    at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)    at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)    at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  InnerException:

How would I correct this problem?

Thanks,
Bill

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Bill Cunnien - 16 Years Ago
Dustin Taylor - 16 Years Ago
Bill Cunnien - 16 Years Ago
Trent L. Taylor - 16 Years Ago
                     here's the sample
Bill Cunnien - 16 Years Ago
                         How do you reproduce the error with your sample? It is not failing, so...
Trent L. Taylor - 16 Years Ago
                             Run the app, minimize the form, then restore the form. The app fails...
Bill Cunnien - 16 Years Ago
                         Hey Bill. I tested over here and got the error. It looks like a...
Ivan George Borges - 16 Years Ago
                             Thanks, Ivan. Not urgent, but the window is already well into the...
Bill Cunnien - 16 Years Ago
                                 I'm sorry, but I cannot reproduce this which means that it has already...
Trent L. Taylor - 16 Years Ago
                                     What version are you using when you run the project?
Bill Cunnien - 16 Years Ago
                                         I added the Try-Catch block asTrent suggested. The form is behaving...
Bill Cunnien - 16 Years Ago
                                             Just add a test that if the WIdth is <= 0 then bail...there is...
Trent L. Taylor - 16 Years Ago
                                                 Will do. Thanks.
Bill Cunnien - 16 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search