Guest Brody Posted July 12, 2004 Report Posted July 12, 2004 I'm in the middle of writing a Smartphone application in VS.NET using C# that uses multiple forms. Seeing as each form's navigation menu is pretty much the same i made the obvious decision to reduce code duplication by including an abstract class. Now this class is the parent obviously and each form is a child of it. My problem lies here as each form automatically inherits from System.Windows.Forms.Form and multiple inheritnece is naturally not allowed so how do i inherit from the Forms class and my own? I have tried making my own class inherit from the Forms class and then having each actual form inherit from my class thus inheriting the Forms class in a roundabout way but the form designer throws up a bug if a form does not directly inherit from the System.Windows.Forms.Form class so i'm stuck! There must be an obvious way around this but i'm not able to see it at the moment! Can anyone help me?
Guest Brody Posted August 16, 2004 Report Posted August 16, 2004 FYI it seems the way to program is to have a main form that spawns all other forms as children...
Guest NeilC_MVP Posted August 18, 2004 Report Posted August 18, 2004 Go read this and Chris Tacke's article that it links to on MSDN. This can be applied to the Smartphone platform as well as Windows CE and Pocket PC.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now