Inheritance with WinPart

Inheritance with WinPart

Old forum URL: forums.lhotka.net/forums/t/4892.aspx


Warren posted on Saturday, May 24, 2008

This is my first .NET project.  It is winforms based on PTracker. I have a few forms woking with my business objects. I am building some form functionality that I would like to propagate to others forms via visual inheritance.  Some candidates for VI include an incremental search that I built and the ErrorProvider control that I have already added to 3 forms.  My question is:

Is it a good design choice to add all my form features I want to share to WinPart.vb since most of my forms are already inherit from the WinPart base control? Any advice is appreciated.

 

rkelley replied on Monday, May 26, 2008

We use forms for most of our apps but with the same priciple, we inherit from BaseEditForm. However we use baseEditForm for virtual functions and common properties and methods. We do not put common components on our base edit form though because they are specific to the datasources that are on each instance of the child form

Copyright (c) Marimer LLC