Visual Inheritance in WinForms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Patrick Corkum

    Visual Inheritance in WinForms

    If I have a form, say FORM_FOO, and a form that it inherits from, say
    FORM_BAR and on FORM_BAR, I have a button, say BTN_RETURN. Now, how do
    I make FORM_FOO actually do true inheritance when I change BTN_RETURN
    on FORM_BAR? In order to actually do that, I have to open every form
    that inherits from FORM_BAR and remove the code manually from
    InitializeCompo nents(). <Never mind the fact that it needs to be
    checked in and out of source safe>. There MUST be a way to make it
    actually work correctly.

    Please help!
    Thanks in advance,
    ~Patrick Corkum
  • Charles Law

    #2
    Re: Visual Inheritance in WinForms

    Hi Patrick

    How are you changing the BTN_RETURN, and what exactly is the code that you
    have to remove from the InitializeCompo nent() method?

    Charles


    "Patrick Corkum" <waitforu@yahoo .com> wrote in message
    news:d3683914.0 405070608.24315 fe7@posting.goo gle.com...[color=blue]
    > If I have a form, say FORM_FOO, and a form that it inherits from, say
    > FORM_BAR and on FORM_BAR, I have a button, say BTN_RETURN. Now, how do
    > I make FORM_FOO actually do true inheritance when I change BTN_RETURN
    > on FORM_BAR? In order to actually do that, I have to open every form
    > that inherits from FORM_BAR and remove the code manually from
    > InitializeCompo nents(). <Never mind the fact that it needs to be
    > checked in and out of source safe>. There MUST be a way to make it
    > actually work correctly.
    >
    > Please help!
    > Thanks in advance,
    > ~Patrick Corkum[/color]


    Comment

    • Patrick Corkum

      #3
      Re: Visual Inheritance in WinForms

      Visual Studio 2003 is much better than 2002 in this
      regards. 2002 put EVERYTHING in the InitializeCompo nent()
      and any images in the .resx. However, since converting to
      2003, I only have 2 lines of code:

      this.BTN_RETURN .Name = "BTN_RETURN ";
      this.Controls.S etChildIndex(th is.BTN_RETURN, 0);

      Thanks,
      ~Patrick Corkum
      [color=blue]
      >-----Original Message-----
      >Hi Patrick
      >
      >How are you changing the BTN_RETURN, and what exactly is[/color]
      the code that you[color=blue]
      >have to remove from the InitializeCompo nent() method?
      >
      >Charles
      >
      >
      >"Patrick Corkum" <waitforu@yahoo .com> wrote in message
      >news:d3683914. 0405070608.2431 5fe7@posting.go ogle.com...[color=green]
      >> If I have a form, say FORM_FOO, and a form that it[/color][/color]
      inherits from, say[color=blue][color=green]
      >> FORM_BAR and on FORM_BAR, I have a button, say[/color][/color]
      BTN_RETURN. Now, how do[color=blue][color=green]
      >> I make FORM_FOO actually do true inheritance when I[/color][/color]
      change BTN_RETURN[color=blue][color=green]
      >> on FORM_BAR? In order to actually do that, I have to[/color][/color]
      open every form[color=blue][color=green]
      >> that inherits from FORM_BAR and remove the code[/color][/color]
      manually from[color=blue][color=green]
      >> InitializeCompo nents(). <Never mind the fact that it[/color][/color]
      needs to be[color=blue][color=green]
      >> checked in and out of source safe>. There MUST be a way[/color][/color]
      to make it[color=blue][color=green]
      >> actually work correctly.
      >>
      >> Please help!
      >> Thanks in advance,
      >> ~Patrick Corkum[/color]
      >
      >
      >.
      >[/color]

      Comment

      Working...