|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Inherited Forms in VB.NET class code does not show 'inherits from...'In VS2005 with VB.NET when a form or usercontrol is inherited: it is
terribly annoying that the code view shows as Public Class statement without the inherits statement. You have to go to the myform.designer.vb code to show this inheritance. Also it is unclear to me where to put an overloaded New(...) definition: in the partial class where you'd type all your other code, or in the myform.designer.vb code ? Jan D'Hondt Database development in .NET DotNetNuke development The designer file is there to isolate designer generated code from your own
code. Keep your own code inside the myform.vb class... For the first point, I don't really have anyway to solve this. Perhaps using a naming convention or a specific folder for Forms ? You could add this as a comment (or perhaps as a statement but I don't know how the compiler will react)... -- Patrice "jandhondt" <jandho***@jadesoft.be> a écrit dans le message de news: 1157979495.263749.131***@h48g2000cwc.googlegroups.com...Show quoteHide quote > In VS2005 with VB.NET when a form or usercontrol is inherited: it is > terribly annoying that the code view shows as Public Class statement > without the inherits statement. > > You have to go to the myform.designer.vb code to show this inheritance. > > Also it is unclear to me where to put an overloaded New(...) > definition: in the partial class where you'd type all your other code, > or in the myform.designer.vb code ? > > Jan D'Hondt > Database development in .NET > DotNetNuke development > "jandhondt" <jandho***@jadesoft.be> wrote in message I have to agree to with this. I have solved it to an extent as Patrice says news:1157979495.263749.131830@h48g2000cwc.googlegroups.com... > In VS2005 with VB.NET when a form or usercontrol is inherited: it is > terribly annoying that the code view shows as Public Class statement > without the inherits statement. > > You have to go to the myform.designer.vb code to show this inheritance. by having a folder structure that reflects inheritance in my solution. Tnx for the replies.
One big reason for me to switch from the old VB6 to VB.NET was the fact that all the code for a form was in 1 file and it was all code, which gave us a lot more control over all the controls in a form compared to the hidden and unreachable code behind VB6 forms. als great for applying inheritance and so forth. Then came VB.2005 and they started to give up the principle of having everything in one file and moved to more hidden files again. There's a an american saying : "If it ain't broken, don't fix it". If only they could appreciate this a bit more at Microsoft. BTW they did add a lot of good things too, but if only they could keep their hands off of things that worked. Robinson schreef: Show quoteHide quote > "jandhondt" <jandho***@jadesoft.be> wrote in message > news:1157979495.263749.131830@h48g2000cwc.googlegroups.com... > > In VS2005 with VB.NET when a form or usercontrol is inherited: it is > > terribly annoying that the code view shows as Public Class statement > > without the inherits statement. > > > > You have to go to the myform.designer.vb code to show this inheritance. > > I have to agree to with this. I have solved it to an extent as Patrice says > by having a folder structure that reflects inheritance in my solution.
Show quote
Hide quote
"jandhondt" <jandho***@jadesoft.be> wrote in message Ah well to be honest, I mostly prefer not having the code cluttering up my news:1157986372.262178.198350@d34g2000cwd.googlegroups.com... > Tnx for the replies. > > One big reason for me to switch from the old VB6 to VB.NET was the fact > that all the code for a form was in 1 file and it was all code, which > gave us a lot more control over all the controls in a form compared to > the hidden and unreachable code behind VB6 forms. als great for > applying inheritance and so forth. > Then came VB.2005 and they started to give up the principle of having > everything in one file and moved to more hidden files again. There's a > an american saying : "If it ain't broken, don't fix it". If only they > could appreciate this a bit more at Microsoft. > BTW they did add a lot of good things too, but if only they could keep > their hands off of things that worked. main source file, especially as it's designer generated. There are certain important things I would like to see in the user source file though - inheritance is one of them and also the constructor. However the latter appears as soon as you write Public Sub New and press enter so it's no biggie. Overall I think 2005 (and .NET 2.0) are a huge improvement over what came before. I gave a try at the other option and it works. You are allowed to duplicate
the inherits statement used in myfile.designer.vb in the myfile.vb file. The compiler will report an error only if you you don't inherit from the same class in those two files... -- Patrice "Robinson" <itoldyounottospamme@nowmyinboxisfull.com> a écrit dans le message de news: ee3qah$qu1$1$830fa***@news.demon.co.uk...Show quoteHide quote > "jandhondt" <jandho***@jadesoft.be> wrote in message > news:1157979495.263749.131830@h48g2000cwc.googlegroups.com... >> In VS2005 with VB.NET when a form or usercontrol is inherited: it is >> terribly annoying that the code view shows as Public Class statement >> without the inherits statement. >> >> You have to go to the myform.designer.vb code to show this inheritance. > > I have to agree to with this. I have solved it to an extent as Patrice > says by having a folder structure that reflects inheritance in my > solution. >
About IDisposable.Dispose()
Configuration in published program java developer wants to learn VB.NET Mnemonics for Buttons with symbols on Mail merge from word using sql server express and vb.net 2005 Referencing an Enum with Embedded Spaces Licensing with Plimus Treeview (Eric Moreau) Display compiled HTML help file in VB.NET app Running and Controling another Application via VB.net Application |
|||||||||||||||||||||||