dahall / AeroWizard

Library for easy creation of custom and Aero Wizards. Aero Wizard strictly follows Microsoft guidelines and uses Visual Styles to get visual theming.
MIT License
112 stars 32 forks source link

Control crashes when disabling windows themes #7

Closed dahall closed 6 years ago

dahall commented 6 years ago

When setting windows 7 to a classic theme the control throws an exception:   WizardControl.cs Line 717: VisualStyleRenderer theme = new VisualStyleRenderer(aw, 0, 0); throws: InvalidOperationException "Visual Styles-related operation resulted in an error because no visual style is currently active"   When making use of Visual styles in controls, the statements involved will throw this exception if visual themes are disabled in windows (Setting it to classic theme) similar to the pre windows vista check added to the code previously.   This is for code version 35908

Originally posted: 2010-02-08T01:44:36

dahall commented 6 years ago

Subsequently the OnPaint methods that are overridden that make use of visual styles as well and will also throw this exception.

Originally posted: 2010-02-08T01:53:26

dahall commented 6 years ago

Fixed problem in latest code drop and release assembly. Thanks for the catch and the suggested solution.

Originally posted: 2010-02-09T20:47:19