Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
109
Red X over Ribbon Bar
posted

We're encountering the following exception during the onpaint method of our ultratoolbar: "System.InvalidOperationException: Visual Styles-related operation resulted in an error because visual styles are currently disabled in the client area."

I looked into the other cases where this is happening, but that did not lead to the root cause. This is happening during our scanner, and with a very specific scanner/driver. I'm sure it's causing some issue. We even have it fixed in newer code but are unsure why. We'd rather not have this issue come back on us so this is my last effort to pinpoint the cause and fix.

Why is the toolbar even repainting? Why would anything dealing with the scanner driver cause the toolbar to redraw?

The ribbon buttons are there and are functional. Alternatively, if we pop up a window prior to scanning (which allows for more detail during scanning) and that form has a tool bar as well, it will also break even though the tool bar is only used to change the look of the form. In this case the red x appears in form title area. Also, no amount of redrawing fixes the red x. Once it's there it stays. Why can the toolbar not redraw itself after this issue?

I'm not expecting a fix, but maybe you have some insight for things I could look for.

Parents
No Data
Reply
  • 109
    Suggested Answer
    posted

    Figured it out.

    Ultratoolbars does not play nicely with windows 7 aero themes. Using windows 7 basic fixed the issue. Though there is a bug to report with ultratoolbar not playing nicely with aero.

Children