Form inheritance - how is it achieved?


Author
Message
Peter Jones
Peter Jones
Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi,

I was hoping I could create a "base" SF Maintenance form that will contain standard code and components, e.g. DefaultLookAndFeel, then inherit this form whenever I create a new form. I have my base form called frmBase_01 and, the code in my test form that is trying use the base form is:

Public Class frmBase_02
   Inherits TMS_Test_01.frmBase_01
End Class

 This generate the error:
"Error 1 Base class 'frmBase_01' specified for class 'frmBase_02' cannot be different from the base class 'MicroFour.StrataFrame.UI.Windows.Forms.StandardForm' of one of its other partial types. C:\Documents and Settings\pmj\My Documents\Visual Studio 2005\Projects\TMS_Test_01\TMS_Test_01\frmBase_02.vb"

Try as I may I just can't stumble my way past this error - can you please point me in the right direction. The recent work I've done with creating a "base" BO class works great but I notice that, for forms, the inheritence is in the partial class - I guess this is a fundemental difference that stops my base BO approach working when trying to achieve the same outcome for a form.

Cheers, Peter

Reply
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
One last thing... there's an Export Template Wizard that can be reached from the File menu... it will get you 90-100% of the way there on creating a custom template.  Just get the form the way you want it then run through the wizard and it will create the .zip file and dump it into your "My Templates" folder.  It's a lot faster than copying an existing template and modifying it... unless you've done it lots of times, even then the wizard is probably still faster Wink

If you can't reach the wizard from the file menu, then you'll have to add the command to your menu by right-clicking somewhere on the toolbars within VS and choose Customize... at the bottom.  The "Export Template..." command is under the File category.  Just drag it out onto the toolbar or menu where you want it.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Peter Jones - 18 Years Ago
Ivan George Borges - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Greg McGuffey - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Greg McGuffey - 18 Years Ago
Peter Jones - 18 Years Ago
Peter Jones - 18 Years Ago
Ivan George Borges - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Greg McGuffey - 18 Years Ago
Peter Jones - 18 Years Ago
Ivan George Borges - 18 Years Ago
StrataFrame Team - 18 Years Ago
StrataFrame Team - 18 Years Ago
                         One last thing... there's an Export Template Wizard that can be...
StrataFrame Team - 18 Years Ago
Peter Jones - 18 Years Ago
             Hey Peter. Glad to hear that. ;)
Ivan George Borges - 18 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search