Windows Develop Bookmark and Share   
 index > Windows Forms Designer > "Window class name not valid" error in designer
 

"Window class name not valid" error in designer

Window class name is not valid.
Hide

at System.Windows.Forms.NativeWindow.WindowClass.RegisterClass()
at System.Windows.Forms.NativeWindow.WindowClass.Create(String className, Int32 classStyle)
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.DateTimePicker.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.ControlCollection.Add(Control value)
at System.Windows.Forms.Form.ControlCollection.Add(Control value)
at System.Windows.Forms.Design.ControlDesigner.DesignerControlCollection.Add(Control c)

Window class name is not valid.

Hide

at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
at System.ComponentModel.Design.InheritedPropertyDescriptor.SetValue(Object component, Object value)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)
cgraus  Wednesday, January 31, 2007 8:07 AM

That is the WSOD - White Screen of Darn. I do not think darn is the best description.

Look around on this forum and you will see lot's of other people with the same problem. Google "WSOD Visual Studio". You'll get a dozen different fixes, none helped me. By the way it is a "feature".

You can try this - did not work for me but it might for you.

<http://www.windowsforms.net/articles/debuggingwsod.aspx>

The only way I know to avoid it is to keep your forms very simple, few components. How is that for help.

Sorry and good luck.

mtm_king  Wednesday, January 31, 2007 10:19 PM

Thanks - I've tried attaching another VS instance, it doesn't catch any exception. I've not changed any code. I've been fighting the WSOD since before release ( and reporting it as a bug ), I can generally work it out, but all of a sudden, my entire project is riddled with them.

I am frankly astounded that someone at MS thought this was a good idea.

cgraus  Thursday, February 01, 2007 7:26 AM

Another clue - I've created a brand new form, and added a button. I get the same 'window class name is not valid' error in a message box when I try to set the backcolor of my button.

Anyone ?

cgraus  Thursday, February 01, 2007 7:41 AM

*bump*

Any chance of a reply from a Microsoftie ? I doubt anyone else understands this insanity.

cgraus  Thursday, February 01, 2007 10:05 PM

You can use google to search for other answers

Custom Search

More Threads

• VS2005 Designer Question
• Simple One: Pass Information From Custom Control Back Up Chain
• Does .NET has this component built in ?
• How to implement a Rocker Switch - 3 Ways
• IList Interface Implementation
• Pb: attribute with an "object" argument and the designer
• Need an HTML editor control
• Determining image type which was saved in resources
• Clicking an invisble button
• DataGridViewColumn