C# Application crashes when WinXP Appearance set to "Windows Classic"
Posted on 2008-06-11
A mysterious thing is happening when the users of an application I am developing runs under Windows XP with its appearance setting set to "Windows Classic Style". The application loads okay, but when a user double-clicks a thumbnail picture to view the picture full size (in a separate form), the application crashes. Here's some of the long error message:
System.Runtime.InteropServices.COMException (0x800A03EA): No image has been specified.
Unable to display image at
System.RuntimeType.Forward CallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32 a WrapperTypes, MessageData& at
EView2.formViewDwg.formViewDwg_SizeChanged(Objectsender, EventArgs e) at
System.Windows.Forms.Control.OnSizeChanged(EventArgs e) ...
The image control is a COM instead of a .Net component.
For comparison, I set my Appearance settings to "Windows Classic Style" and ran the application. Instead of crashing, mine didn't display the picture and left a blank image, but it didn't crash.
When I change my Appearance setting back to "Windows XP Style" everything works fine.
This has left me clueless as to what is wrong. I hope someone has an idea to explain why this is happening.