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. C#
  4. Inheriting !

Inheriting !

Scheduled Pinned Locked Moved C#
delphihelp
4 Posts 3 Posters 1 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.
  • M Offline
    M Offline
    mrkeivan
    wrote on last edited by
    #1

    hey guys ! I have like 20 forms in my project that all are pretty much the same, so i'm looking for a way to doublicate them(Like in delphi)! I tried to add Inherite forms but when i do that I just get the controls not the code !! plz help me out Thanx Mr.K

    M R 2 Replies Last reply
    0
    • M mrkeivan

      hey guys ! I have like 20 forms in my project that all are pretty much the same, so i'm looking for a way to doublicate them(Like in delphi)! I tried to add Inherite forms but when i do that I just get the controls not the code !! plz help me out Thanx Mr.K

      M Offline
      M Offline
      Michael Sync
      wrote on last edited by
      #2

      mrkeivan wrote:

      I have like 20 forms in my project that all are pretty much the same,

      Why not use only 1 form if all forms are the same?

      mrkeivan wrote:

      so i'm looking for a way to doublicate them

      What about "Copy and Paste"? :)

      mrkeivan wrote:

      I tried to add Inherite forms but when i do that I just get the controls not the code !!

      Yeah. This is the way it is.. this is like inheriting the base class. When you inherit the base class, the new class won't get the code but it access its parent functionalities. What about creating a user control? If the most of things (controls, layout) are the same, you may probably create one user control. Place this control in all forms.

      Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. :)

      1 Reply Last reply
      0
      • M mrkeivan

        hey guys ! I have like 20 forms in my project that all are pretty much the same, so i'm looking for a way to doublicate them(Like in delphi)! I tried to add Inherite forms but when i do that I just get the controls not the code !! plz help me out Thanx Mr.K

        R Offline
        R Offline
        Rudolf Jan
        wrote on last edited by
        #3

        There is posisbility to use inherited forms. (In the new item window). I tried to use this, but it does not work well with the form designer view (unfortunately). You can try to put all functional stuff in a separate class and use an object of this class in your form. You even can attach alle controls to control functionality you define in this class. Rudolf Heijink

        M 1 Reply Last reply
        0
        • R Rudolf Jan

          There is posisbility to use inherited forms. (In the new item window). I tried to use this, but it does not work well with the form designer view (unfortunately). You can try to put all functional stuff in a separate class and use an object of this class in your form. You even can attach alle controls to control functionality you define in this class. Rudolf Heijink

          M Offline
          M Offline
          Michael Sync
          wrote on last edited by
          #4

          Rudolf Jan Heijink wrote:

          but it does not work well with the form designer view (unfortunately).

          ya. me too.. it sucks..

          Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. :)

          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