We have a problem with VintaSoftTwain disabling visual styles in our application. This is causing the DevComponents DotNetBar controls to crash when being redrawn.
Here is the message/stack trace:
Visual Styles-related operation resulted in an error because visual styles are currently disabled in the client area.
at System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsCombinationDefined(String className, Int32 part)
at System.Windows.Forms.VisualStyles.VisualStyleRenderer..ctor(String className, Int32 part, Int32 state)
at System.Windows.Forms.VisualStyles.VisualStyleRenderer..ctor(VisualStyleElement element)
at DevComponents.DotNetBar.бІ†.бІ‹(Graphics ШЅ, String Ъ°, Font аёЈ, Rectangle аЈ‹, аё· бІЊ, Color аё®, Boolean бІЌ, Boolean бІЋ, Int32 бІЏ)
at DevComponents.DotNetBar.бІ†.бІ‹(Graphics ШЅ, String Ъ°, Font аёЈ, Rectangle аЈ‹, аё· бІЊ)
at DevComponents.DotNetBar.бІ†.бІ‘(Graphics ШЅ, String Ъ°, Font аёЈ, Rectangle аІ—, Boolean бІ’)
at DevComponents.DotNetBar.бІ†.PaintCaptionText(RibbonControlRendererEventArgs e)
at DevComponents.DotNetBar.Rendering.Office2007Renderer.DrawRibbonFormCaptionText(RibbonControlRendererEventArgs e)
at DevComponents.DotNetBar.RibbonStrip.PaintControlBackground(ItemPaintArgs pa)
at DevComponents.DotNetBar.ItemControl.PaintControl(ItemPaintArgs pa)
at DevComponents.DotNetBar.ItemControl.аЁ“(PaintEventArgs Шё, Boolean аЁ”)
at DevComponents.DotNetBar.ItemControl.аЁЏ(PaintEventArgs Шё)
at DevComponents.DotNetBar.Office2007RibbonForm.б©Џ()
at DevComponents.DotNetBar.Office2007RibbonForm.WindowsMessageNCActivate(Message& m)
at DevComponents.DotNetBar.Office2007RibbonForm.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)
Unfortunately, since the DotNetBar code is third-party, I cannot make any changes to it.Has anyone come across this problem before?
Thanks,
Andy
