Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How do i enherit forms?

How do i enherit forms?

Scheduled Pinned Locked Moved Visual Basic
question
10 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Polymorpher
    wrote on last edited by
    #1

    I am trying to make a base form that has the controls that i want every other form in my program to have...i thought maybe i could just build that form and then have my other forms inherit from it so they would have those same controls and then i could add the extra stuff that the indevidual form needed...but it wont let me open my forms that inherit from the base form in the designer......Im not sure what if anything i can do about this, but if you have any ideas pleas let me know. Thank you in advance ;) Pablo

    R R 2 Replies Last reply
    0
    • P Polymorpher

      I am trying to make a base form that has the controls that i want every other form in my program to have...i thought maybe i could just build that form and then have my other forms inherit from it so they would have those same controls and then i could add the extra stuff that the indevidual form needed...but it wont let me open my forms that inherit from the base form in the designer......Im not sure what if anything i can do about this, but if you have any ideas pleas let me know. Thank you in advance ;) Pablo

      R Offline
      R Offline
      Rana Muhammad Javed Khan
      wrote on last edited by
      #2

      In code window Replace Inherits System.Windows.Forms.Form With Inherits frmSetupTemplate 'frmSetupTemplate Name of ur Form which u want as base Regards, Javed

      P 1 Reply Last reply
      0
      • P Polymorpher

        I am trying to make a base form that has the controls that i want every other form in my program to have...i thought maybe i could just build that form and then have my other forms inherit from it so they would have those same controls and then i could add the extra stuff that the indevidual form needed...but it wont let me open my forms that inherit from the base form in the designer......Im not sure what if anything i can do about this, but if you have any ideas pleas let me know. Thank you in advance ;) Pablo

        R Offline
        R Offline
        Ray Cassick
        wrote on last edited by
        #3

        Do you have your base form defined as mustinherit by chance?


        My Blog[^]
        FFRF[^]


        P 1 Reply Last reply
        0
        • R Rana Muhammad Javed Khan

          In code window Replace Inherits System.Windows.Forms.Form With Inherits frmSetupTemplate 'frmSetupTemplate Name of ur Form which u want as base Regards, Javed

          P Offline
          P Offline
          Polymorpher
          wrote on last edited by
          #4

          M Javed Khan wrote:

          Inherits System.Windows.Forms.Form With Inherits frmSetupTemplate 'frmSetupTemplate Name of ur Form which u want as base

          Right thats what i was doing...but it wont let me edit the inheriting form in the designer when i do that Pablo

          R R 2 Replies Last reply
          0
          • R Ray Cassick

            Do you have your base form defined as mustinherit by chance?


            My Blog[^]
            FFRF[^]


            P Offline
            P Offline
            Polymorpher
            wrote on last edited by
            #5

            No, should I? Pablo

            R 1 Reply Last reply
            0
            • P Polymorpher

              No, should I? Pablo

              R Offline
              R Offline
              Ray Cassick
              wrote on last edited by
              #6

              No it causes problems on its own. People try it. IMHO it SHOULD let you but it doe snot work right, It stops you from being able to even open a form that derives from the base form in the designer at all.


              My Blog[^]
              FFRF[^]


              P 1 Reply Last reply
              0
              • P Polymorpher

                M Javed Khan wrote:

                Inherits System.Windows.Forms.Form With Inherits frmSetupTemplate 'frmSetupTemplate Name of ur Form which u want as base

                Right thats what i was doing...but it wont let me edit the inheriting form in the designer when i do that Pablo

                R Offline
                R Offline
                Ray Cassick
                wrote on last edited by
                #7

                You can't edit the inheriting form (at least not the parts that have been inherited). but you should be able to add controls to it and edit those.


                My Blog[^]
                FFRF[^]


                P 1 Reply Last reply
                0
                • P Polymorpher

                  M Javed Khan wrote:

                  Inherits System.Windows.Forms.Form With Inherits frmSetupTemplate 'frmSetupTemplate Name of ur Form which u want as base

                  Right thats what i was doing...but it wont let me edit the inheriting form in the designer when i do that Pablo

                  R Offline
                  R Offline
                  Rana Muhammad Javed Khan
                  wrote on last edited by
                  #8

                  hmmm the control which you want to edit in inherited form make its Modifier Property Value = "Public" then you will be abe to edit it. Regards, Javed :)

                  1 Reply Last reply
                  0
                  • R Ray Cassick

                    You can't edit the inheriting form (at least not the parts that have been inherited). but you should be able to add controls to it and edit those.


                    My Blog[^]
                    FFRF[^]


                    P Offline
                    P Offline
                    Polymorpher
                    wrote on last edited by
                    #9

                    When i inherit a base form and then try to open the new form in the editor i get a balnk screen and in the build errors section it says that no designable items where found Pablo

                    1 Reply Last reply
                    0
                    • R Ray Cassick

                      No it causes problems on its own. People try it. IMHO it SHOULD let you but it doe snot work right, It stops you from being able to even open a form that derives from the base form in the designer at all.


                      My Blog[^]
                      FFRF[^]


                      P Offline
                      P Offline
                      Polymorpher
                      wrote on last edited by
                      #10

                      Right...this is a strange problem, im starting to think maybe something is wrong with my install of Visual Studio...but everything else seems to be working...maybe i should reinstall it anyways just to be sure its not the probelm. Pablo

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups