Form Inheritance still a problem in VS 2003?

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

I'm running into a problem that I've seen ALOT of people
have. I've created a base form and when I try to bring up
the inherited form in the form designer, it says that

"The designer could not be shown for this file because
none of the classes within it can be designed."

I've tried restarting VS.NET, rebuilding, closing all
design views, just about everything that anyone has said
to try and do.

Has MS released anything on this yet or does anyone know
what the problem could be. This is VERY frustrating.
 
Mike said:
I'm running into a problem that I've seen ALOT of people
have. I've created a base form and when I try to bring up
the inherited form in the form designer, it says that

"The designer could not be shown for this file because
none of the classes within it can be designed."

For me it works perfectly...
Is your Forms-class really the FIRST class in the cs-file ?
Your Forms-Class MUST BE the first class in the cs-file.


--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp

Do you need daily reports from your server?
http://sourceforge.net/projects/srvreport/
 
Thanks Jochen for replying.

Yes, it is the first class in the file.

Get this though...I turned off CAS and it works no problem.

Since that is the case, here is some info on my setup as
it pertains to CAS.

My development directory is on a drive that is mapped to
myself. I have gone into the the framework security setup
and given my intranet FULL trust, so really it should
behave as though it were located on my local computer.
But when I tested the form inheritance from a project on
my local machine, it didn't work either, which is why I
ruled out code security as the culprit early on. But as
stated above, it does seem to be the source of the problem.

What do you think is going on here?
 
I have seen this same problem with VB.NET when I have code in the Form.Load
or Form.Activiate event in the base class. If I comment this code out,
everything seems to work fine. But as soon as I uncomment this code, I get
the same problems that you are describing...

Not sure if that helps,
 
I'll echo Mark, and also remind you to watch out for code in Form.Load which
doesn't work in design mode. I recently drove myself nearly mad by adding a
datagrid to a base form - along with code to not display the datagrid if
there was no data in it.

Strangely enough, there was no data at design-time...
 
Back
Top