I am getting this crash in my application when an entire toolbar is disabled. What seems to be a contributory factor is that there is one button on the toolbar that is marked as visible = false at the time when the toolbar is disabled.
Looking through the posts for the various controls there seemed to have been a very similar crash in SandDock a while back.
http://community.divelements.co.uk/CS/forums/10516/ShowPost.aspx
I am currently using SandBar 1.3.4.1, but I have verified 1.4 as well, and I can reproduce the same problem.
************** Exception Text **************
System.ArgumentException: Rectangle '{X=0,Y=0,Width=0,Height=0}' cannot have a width or height equal to 0.
at System.Drawing.Drawing2D.LinearGradientBrush..ctor(Rectangle rect, Color color1, Color color2, LinearGradientMode linearGradientMode)
at TD.SandBar.Office2003Renderer.DrawButtonHighlight(Graphics graphics, Rectangle bounds, DrawItemState state, Boolean dropDown)
at TD.SandBar.OfficeRendererBase.DrawToolBarItem(ToolbarItemBase item, Graphics graphics, Font font, Boolean vertical, DrawItemState state, ToolBarTextAlign textAlign)
at TD.SandBar.ToolbarItemBase.Paint(IToolBarRenderer renderer, Graphics graphics, Font font, Boolean vertical, Boolean rtl, ToolBarTextAlign textAlign, DrawItemState state)
at TD.SandBar.ToolBar.
(IToolBarRenderer , Graphics , ToolbarItemBase , Boolean , Boolean , Boolean )
at TD.SandBar.ToolBar.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at TD.SandBar.ToolBar.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)