creating a Form(Of T)... Is this insane?

F

fuiru2000

Basically, what I'm trying to do is as follows:

in one .vb ...
Friend Class frmBase(Of T)
Inherits System.Windows.Forms.Form

Dim m_Obj as T

....
End Class

in another .vb ...
Friend Class frmDerived1
Inherits frmBase(Of SomeConcreteType)

....
End Class

The code itself works, but s you might expect, I'm getting an error
when trying to open up the derived forms in the Designer in VS2005,
with a "base class X could not be loaded" message. Is there something I
should look for that might prevent it, or it just the fact that I'm
trying to use Generics like this?

Thanks for any help,
-Phil M
 
R

Robbe Morris [C# MVP]

The designer has all sorts of problems with visual inheritance.
It doesn't surprise me a bit that creating a generic
form would cause problems with the designer.
 
M

Michael Bosch

Robbe Morris said:
The designer has all sorts of problems with visual inheritance.
It doesn't surprise me a bit that creating a generic
form would cause problems with the designer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top