Inheritence in forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pakmarshal
    New Member
    • Aug 2009
    • 17

    Inheritence in forms

    Hi everyone,

    I am developing a windows based application in VS2005. I want all my form to be inherits from one of my class e.g.ParentClass but indeed the windows forms already inherits windows.forms.f orm class. what I have tried is that, I inherit "windows.forms. form" in "ParentClas s" and all forms inherits my "ParentClas s". But in this case when I view the design of the form IDE gives error. Please guide my in this regard.

    Thanks and Regards
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    That shouldn't be a problem. What you've described sounds fine.
    The same thing is done in this tutorial, only using UserControl instead of Form.
    In the end all of these items inherit from Control.

    Comment

    • Pakmarshal
      New Member
      • Aug 2009
      • 17

      #3
      Simple solution can be

      Comment

      • tlhintoq
        Recognized Expert Specialist
        • Mar 2008
        • 3532

        #4
        So the "simple answer" was to mark it 'public' and 'inherits' from... ?
        So the simple answer was to follow the instructions on MSDN. Got it.

        Comment

        Working...