﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Handling Form Inheritance</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 25 May 2026 18:40:14 GMT</lastBuildDate><ttl>20</ttl><item><title>Handling Form Inheritance</title><link>http://forum.strataframe.net/FindPost27948.aspx</link><description>Hi there,&lt;/P&gt;&lt;P&gt;I am going to set up the forms I will be using in my project, encountered some problems, solved them and would like to ask you, if my way will work or if there are pitfalls I have not seen yet.&lt;/P&gt;&lt;P&gt;I made a baseform ("MyBaseFRM") which inherits from the strataframe-standardform. There is a themed panel on it and the form has some properties and methods all forms will have. I created new forms by selecting "New Item/Windows-Form/Inherited Form" (I hope this is right translated, I use a german version of VS2010).&lt;/P&gt;&lt;P&gt;Then I created a form, let's name it&amp;nbsp;"MySimplegridFRM" which inherits from "MyBaseFRM" and thought, I could create Forms from this Inherited Form the same way to. But this does not work.&lt;/P&gt;&lt;P&gt;Setting up a new form by choosing any kind of form and setting the inheritance-statement did not work too. Or creating a class which inherits from "MySimpleGridFRM".&lt;/P&gt;&lt;P&gt;Finally I ended up creating templates. I made a template from my "MySimpleGridFRM" and now everything works fine. I tested adding some properties in "MyBaseFRM" and could see that this changes were reflected in the inherited "MySimpleGridFRM". So everything works like I expected it to be but as I am new to inheritance in VB. I would like to ask you if this will work or if there are things I have not considered yet. I should add that all the forms I will need will inherit from "MyBaseFRM", "deeper" inheritance is not needed for my forms.&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;P&gt;Thomas</description><pubDate>Mon, 16 Aug 2010 06:35:53 GMT</pubDate><dc:creator>Thomas Holste</dc:creator></item><item><title>RE: Handling Form Inheritance</title><link>http://forum.strataframe.net/FindPost27964.aspx</link><description>You're welcome, Thomas. ;)</description><pubDate>Mon, 16 Aug 2010 06:35:53 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Handling Form Inheritance</title><link>http://forum.strataframe.net/FindPost27956.aspx</link><description>Hi Ivan,&lt;/P&gt;&lt;P&gt;thank you for showing me the possibilities. I will try to subclass a BO and see if I can make it run. Les Pinter has an example on subclassing a BO on his website (that is where I discovered Strataframe) I will try to follow.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Thomas</description><pubDate>Sun, 15 Aug 2010 06:33:42 GMT</pubDate><dc:creator>Thomas Holste</dc:creator></item><item><title>RE: Handling Form Inheritance</title><link>http://forum.strataframe.net/FindPost27954.aspx</link><description>Yes, dropping them on the forms will work great, but with time you could start thinking about having a generic fill method, or a rule that all BOs should follow, you might need a new property that all BOs should have so you could set different states, a generic SetDefaultValues so if all your tables have a CreatedBy column, then all BOs would generate the content for this column without you having to set it to every BO you create. There are many possibilities, so I guess it is worth starting this way at this point of your developing stage.</description><pubDate>Sat, 14 Aug 2010 14:42:44 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Handling Form Inheritance</title><link>http://forum.strataframe.net/FindPost27953.aspx</link><description>Hi Ivan,&lt;/P&gt;&lt;P&gt;thanks for your reply. What is the advantage of subclassing a business-object?&lt;/P&gt;&lt;P&gt;What kind of additions or modifications have you made with this base-BO-class?&lt;/P&gt;&lt;P&gt;I have not done so much with BOs except dropping them on a form and being happy how easy everything works.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Thomas</description><pubDate>Sat, 14 Aug 2010 14:28:50 GMT</pubDate><dc:creator>Thomas Holste</dc:creator></item><item><title>RE: Handling Form Inheritance</title><link>http://forum.strataframe.net/FindPost27949.aspx</link><description>Hi Thomas.&lt;/P&gt;&lt;P&gt;Yep, this is the way to go.&lt;/P&gt;&lt;P&gt;I have a BaseForm that inherits from StrataFrame StandardForm and I have an item template inheriting from it. I also have a MaintenanceForm that inherits from MY BaseForm and I also have an item template that inherits from it.&lt;/P&gt;&lt;P&gt;Another thing you should consider is to have a BaseBO that inherits from &lt;FONT size=2&gt;MicroFour.StrataFrame.Business.BusinessLayer and then I also have an item template that inherits from my BaseBO.&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Sat, 14 Aug 2010 11:06:27 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item></channel></rss>