HELP: Suddenly getting an exception in the Design View with StatusStrip (C# IDE)

I am using the C# 2005 Express Edition on Windows XP Media Edition.

Earlier today as I was going through some tutorials and everything was working correctly. Then all of a sudden, all of my projects that contain a StatusStrip in one or more forms started throwing an exception within the IDE!

I have tried the following things:
1. I created a new project, and added only a StatusStrip to the default form, it immediately gets the exception (shown below)
2. I then re-ran the install and chose the "Repair/Re-install" option. I went through the whole process including the reboots. I did not uninstall the tool first, I only tried installing over the top of the existing tool. The error still occurs in a new project.

The error looks like this:

"The control System.Windows.Forms.StatusStrip has thrown an unhandled exception in the designer and has been disabled.

Exception:
Given combination of Class, Part, and State is not defined by the current visual style.

Stack Trace:
  at System.Windows.Forms.StatusStrip.OnPaintBackground(PaintEventArgs e)
  at System.Windows.Forms.StatusStrip.WndProc(Message& m)"




Also, the StatusStrip object in the design view is replaced by an error message in large red letters and reads:
      "System Argument Exception: Given combination"...
(it appears to be truncated to the size of the statusStrip object)

Has anyone seen this, or does anyone know what I might have done wrong to have caused this to start happening I can't use a StatusStrip at all now, even in a new project where there is nothing else! I'm very confused. It was working just fine all day until about an hour ago, then all of a sudden all StatusStrips get this error now. I really want to have a status bar in my app! Please help if you can!!

Thanks for taking the time to read this, and for your help!

-mike



Answer this question

HELP: Suddenly getting an exception in the Design View with StatusStrip (C# IDE)

  • John Love

    Ok, for anyone who runs into this problem, I was able to fix it by doing the following:

    1. Uninstall all Visual Studio 2005 Express Edition products
    2. Re-install Visual Studio 2005 C# Express Edition

    The problem has apparently gone away at this time.


  • JawCo

    I also just realized that the String Editor for objects like a ListBox do not work anymore either.

    At this point I am starting to think that something has become corrupt in the VC# IDE that a Repair will not fix. I will try uninstalling it completely (and VisualBasic and Web Developer) so that all Express Editions are uninstalled. Then I will install C# Express only and see if things work better.

    I won't be doing this until later, so if anyone who reads this thinks of a better solution please let me know and I'll try that.

    The weird thing is that I did not have a crash or anything like that. I was working along normally when my StatusStrip suddenly produced the exception I described in my previous post. So, I removed my StatusStrip and things were ok until I just realized that I cannot add strings to a list box in the IDE now either.

    I drag a ListBox to my form
    then I use the little arrow at the top right of the control to "Edit Items"
    The String Editor flashes very quickly with a big red X across it, and then disappears just as quickly. It is so fast I can barely see it.

    Has anyone else seen these problems

  • HELP: Suddenly getting an exception in the Design View with StatusStrip (C# IDE)