Sometimes in my project, some forms are not recognised as type "form". (They
are actually inherited from another one of my forms).
However, when this happens I can only view the code. The icon in the
Solution Explorer is the type for a module, not a form. It also happens
without my making any changes to the forms - i.e. I just open the Solution
one day, and they're broken. Normally I can make a few edits and get it
working, but then I rollback my changes (to what it was before) and it's
still working!
It seems to happen randomly for some forms and not others. This is strange
because they are all inherited from the same form.
At the moment it's a pain because half of the forms in my project think they
are modules :-(
Any ideas please?
Thanks,
Steve
Steve Dyte - 20 May 2005 09:41 GMT
We've managed to fix this now but still have no idea how it happened.
The fix was to remove one of the broken forms from the project and then
re-add it. This magically fixed all the broken forms!!
The solution was in the project file. The broken forms all had their type as
"Code". Looking in SourceSafe, this changed from "Form" yesterday, but I've
no idea why?? All I remember doing yesterday was adding a new "plain" form to
the project.
Steve
Marc Bernard - 20 May 2005 17:21 GMT
> Sometimes in my project, some forms are not recognised as type "form".
> (They
> are actually inherited from another one of my forms).
One of my favourite Visual Studio bugs...
You can fix this in the IDE. Find your class:
MyClass : MyBaseClass
and cut/paste the MyBaseClass. It should fix the icon in the Solution
Explorer.
Could be covered by this:
http://support.microsoft.com/default.aspx?scid=kb;en-us;838534
Marc