Partial type request for RTM

I just noticed that in VB.NET 2005 Beta 2, you can't tell (by default) what class a Windows Form inherits from.  For example:

Public Class Form1

End Class

We use visual inheritance a lot at my company.  It would be nice if MS would move the inherits statement out of the designer code and into the 'main' VB form.  




Answer this question

Partial type request for RTM

  • Manas

    But visual inheritance still works, right ! You just can't see the base class in the code, because it's in the .Designer partial class. And this makes sense, because at the time the designer creates it's partial class, it can't assume that you will add your own partial class later and remember to put the "Inherits xyz" yourself.
  • SabTimur

    I'm not 100% sure, because I haven't tried it yet, but if it bothers you, you could probably change the templates or make your own new one.  You can do this for things like moving the constructor out of the designer file and things of that nature so I'd imagine it would work for the inherits line too.  Give it a go.
  • Peso

    > But visual inheritance still works, right ! 

    Thankfully, yes.

    > And this makes sense, because at the time the 
    > designer creates it's partial class, it can't assume 
    > that you will add your own partial class later and 
    > remember to put the "Inherits xyz" yourself. 

    No, it will still work.  I'm just saying to put the Inherits line in the 'main' class so you don't have to modify the designer generated code.  Everything will still work the same.  I tried it.  I would just rather have the Inherits line where it's easy to see.

  • Partial type request for RTM