From Inherits

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

    #1

    From Inherits

    Hi,
    playing around i created a form that has a calendar and a textbox1.
    I created another from that inherits from form1. on this second form I put
    another textbox(textbox 2). Now, on the second from when the value in the
    form1.textbox1 changes, I want it to be displayed in textbox2 also. How is
    this done?
    Brian


  • kimiraikkonen

    #2
    Re: From Inherits

    On Apr 15, 6:02 pm, "Brian" <bsgalla...@com munity.nospamwr ote:
    Hi,
    playing around i created a form that has a calendar and a textbox1.
    I created another from that inherits from form1.  on this second form I put
    another textbox(textbox 2).  Now, on the second from when the value in the
    form1.textbox1 changes, I want it to be displayed in textbox2 also.  Howis
    this done?
        Brian
    On your second form,
    textbox2.text = form1.textbox1. text should do the trick in any control
    event you desire, however you may want to put this in textbox2's
    textchanged event to equalise in every type attempt on textbox2.

    Hope this helps,

    Onur

    Comment

    • Brian

      #3
      Re: From Inherits

      I did that on the form load.... what I need I suppose is access to the event
      handler for textbox1?

      Me.TextBox2.Tex t = frmMain.TextBox 1.Text

      "kimiraikko nen" <kimiraikkonen8 5@gmail.comwrot e in message
      news:979f0c01-db03-4e64-854c-b64f4d7f4ef4@n1 g2000prb.google groups.com...
      On Apr 15, 6:02 pm, "Brian" <bsgalla...@com munity.nospamwr ote:
      Hi,
      playing around i created a form that has a calendar and a textbox1.
      I created another from that inherits from form1. on this second form I put
      another textbox(textbox 2). Now, on the second from when the value in the
      form1.textbox1 changes, I want it to be displayed in textbox2 also. How is
      this done?
      Brian
      On your second form,
      textbox2.text = form1.textbox1. text should do the trick in any control
      event you desire, however you may want to put this in textbox2's
      textchanged event to equalise in every type attempt on textbox2.

      Hope this helps,

      Onur


      Comment

      • kimiraikkonen

        #4
        Re: From Inherits

        On Apr 15, 6:29 pm, "Brian" <bsgalla...@com munity.nospamwr ote:
        I did that on the form load.... what I need I suppose is access to the event
        handler for textbox1?
        >
        Me.TextBox2.Tex t = frmMain.TextBox 1.Text
        >
        "kimiraikko nen" <kimiraikkone.. .@gmail.comwrot e in message
        >
        news:979f0c01-db03-4e64-854c-b64f4d7f4ef4@n1 g2000prb.google groups.com...
        On Apr 15, 6:02 pm, "Brian" <bsgalla...@com munity.nospamwr ote:
        >
        Hi,
        playing around i created a form that has a calendar and a textbox1.
        I created another from that inherits from form1. on this second form I put
        another textbox(textbox 2). Now, on the second from when the value in the
        form1.textbox1 changes, I want it to be displayed in textbox2 also. How is
        this done?
        Brian
        >
        On your second form,
        textbox2.text = form1.textbox1. text should do the trick in any control
        event you desire, however you may want to put this in textbox2's
        textchanged event to equalise in every type attempt on textbox2.
        >
        Hope this helps,
        >
        Onur
        You can add event handler to call event, however you can equalise
        textboxes in form_load as you've done. When do you want to equalise
        two textboxes?

        Comment

        • Brian

          #5
          Re: From Inherits

          i was just wanting to test.. on form1 with the monthcalendar, I have the
          date being put into textbox1... but I'd to see when the value on textbox1
          changes it changes in textbox2 on form2.
          Brian
          "kimiraikko nen" <kimiraikkonen8 5@gmail.comwrot e in message
          news:d6b73bef-f896-49c2-a35e-19f0d56ec9c8@w8 g2000prd.google groups.com...
          On Apr 15, 6:29 pm, "Brian" <bsgalla...@com munity.nospamwr ote:
          I did that on the form load.... what I need I suppose is access to the
          event
          handler for textbox1?
          >
          Me.TextBox2.Tex t = frmMain.TextBox 1.Text
          >
          "kimiraikko nen" <kimiraikkone.. .@gmail.comwrot e in message
          >
          news:979f0c01-db03-4e64-854c-b64f4d7f4ef4@n1 g2000prb.google groups.com...
          On Apr 15, 6:02 pm, "Brian" <bsgalla...@com munity.nospamwr ote:
          >
          Hi,
          playing around i created a form that has a calendar and a textbox1.
          I created another from that inherits from form1. on this second form I
          put
          another textbox(textbox 2). Now, on the second from when the value in the
          form1.textbox1 changes, I want it to be displayed in textbox2 also. How
          is
          this done?
          Brian
          >
          On your second form,
          textbox2.text = form1.textbox1. text should do the trick in any control
          event you desire, however you may want to put this in textbox2's
          textchanged event to equalise in every type attempt on textbox2.
          >
          Hope this helps,
          >
          Onur
          You can add event handler to call event, however you can equalise
          textboxes in form_load as you've done. When do you want to equalise
          two textboxes?


          Comment

          • Brian

            #6
            Re: From Inherits

            ok, what event would i call in with the inherit form1.monthcale ndar has been
            changed and I want that date to show up on form2.textbox2?


            "Brian" <bsgallatin@com munity.nospamwr ote in message
            news:OmgL5fxnIH A.3676@TK2MSFTN GP04.phx.gbl...
            >i was just wanting to test.. on form1 with the monthcalendar, I have the
            >date being put into textbox1... but I'd to see when the value on textbox1
            >changes it changes in textbox2 on form2.
            Brian
            "kimiraikko nen" <kimiraikkonen8 5@gmail.comwrot e in message
            news:d6b73bef-f896-49c2-a35e-19f0d56ec9c8@w8 g2000prd.google groups.com...
            On Apr 15, 6:29 pm, "Brian" <bsgalla...@com munity.nospamwr ote:
            >I did that on the form load.... what I need I suppose is access to the
            >event
            >handler for textbox1?
            >>
            >Me.TextBox2.Te xt = frmMain.TextBox 1.Text
            >>
            >"kimiraikkonen " <kimiraikkone.. .@gmail.comwrot e in message
            >>
            >news:979f0c0 1-db03-4e64-854c-b64f4d7f4ef4@n1 g2000prb.google groups.com...
            >On Apr 15, 6:02 pm, "Brian" <bsgalla...@com munity.nospamwr ote:
            >>
            Hi,
            playing around i created a form that has a calendar and a textbox1.
            I created another from that inherits from form1. on this second form I
            put
            another textbox(textbox 2). Now, on the second from when the value in
            the
            form1.textbox1 changes, I want it to be displayed in textbox2 also. How
            is
            this done?
            Brian
            >>
            >On your second form,
            >textbox2.tex t = form1.textbox1. text should do the trick in any control
            >event you desire, however you may want to put this in textbox2's
            >textchanged event to equalise in every type attempt on textbox2.
            >>
            >Hope this helps,
            >>
            >Onur
            >
            You can add event handler to call event, however you can equalise
            textboxes in form_load as you've done. When do you want to equalise
            two textboxes?
            >

            Comment

            • Brian

              #7
              Re: From Inherits

              oK... Create a even for textbox1 in form2.. and instead of
              frmmain.textbox 1.text I used textbox1.text.. ....
              I got to thinking that it must copy the controls over as well.. that is why
              the default frist textbox I added was textbox2.
              Thanks for the help
              Brian
              "kimiraikko nen" <kimiraikkonen8 5@gmail.comwrot e in message
              news:d6b73bef-f896-49c2-a35e-19f0d56ec9c8@w8 g2000prd.google groups.com...
              On Apr 15, 6:29 pm, "Brian" <bsgalla...@com munity.nospamwr ote:
              I did that on the form load.... what I need I suppose is access to the
              event
              handler for textbox1?
              >
              Me.TextBox2.Tex t = frmMain.TextBox 1.Text
              >
              "kimiraikko nen" <kimiraikkone.. .@gmail.comwrot e in message
              >
              news:979f0c01-db03-4e64-854c-b64f4d7f4ef4@n1 g2000prb.google groups.com...
              On Apr 15, 6:02 pm, "Brian" <bsgalla...@com munity.nospamwr ote:
              >
              Hi,
              playing around i created a form that has a calendar and a textbox1.
              I created another from that inherits from form1. on this second form I
              put
              another textbox(textbox 2). Now, on the second from when the value in the
              form1.textbox1 changes, I want it to be displayed in textbox2 also. How
              is
              this done?
              Brian
              >
              On your second form,
              textbox2.text = form1.textbox1. text should do the trick in any control
              event you desire, however you may want to put this in textbox2's
              textchanged event to equalise in every type attempt on textbox2.
              >
              Hope this helps,
              >
              Onur
              You can add event handler to call event, however you can equalise
              textboxes in form_load as you've done. When do you want to equalise
              two textboxes?


              Comment

              • Brian S.

                #8
                Re: From Inherits

                Ok, thought I had this but I don't... when i look at the form2(child) I get
                errors about not being displayed.....
                This should be simple, but I am not seeing it....
                when I click on calendar1 from form1 and the textbox1 changes...... I want
                to know how I can
                set the text in textbox2 on the form2 and how do I read the value of
                textbox1 or the calender value from form2...
                Please help :)
                Brian

                "Brian" <bsgallatin@com munity.nospamwr ote in message
                news:%23Fo16g0n IHA.4864@TK2MSF TNGP05.phx.gbl. ..
                oK... Create a even for textbox1 in form2.. and instead of
                frmmain.textbox 1.text I used textbox1.text.. ....
                I got to thinking that it must copy the controls over as well.. that is
                why the default frist textbox I added was textbox2.
                Thanks for the help
                Brian
                "kimiraikko nen" <kimiraikkonen8 5@gmail.comwrot e in message
                news:d6b73bef-f896-49c2-a35e-19f0d56ec9c8@w8 g2000prd.google groups.com...
                On Apr 15, 6:29 pm, "Brian" <bsgalla...@com munity.nospamwr ote:
                >I did that on the form load.... what I need I suppose is access to the
                >event
                >handler for textbox1?
                >>
                >Me.TextBox2.Te xt = frmMain.TextBox 1.Text
                >>
                >"kimiraikkonen " <kimiraikkone.. .@gmail.comwrot e in message
                >>
                >news:979f0c0 1-db03-4e64-854c-b64f4d7f4ef4@n1 g2000prb.google groups.com...
                >On Apr 15, 6:02 pm, "Brian" <bsgalla...@com munity.nospamwr ote:
                >>
                Hi,
                playing around i created a form that has a calendar and a textbox1.
                I created another from that inherits from form1. on this second form I
                put
                another textbox(textbox 2). Now, on the second from when the value in
                the
                form1.textbox1 changes, I want it to be displayed in textbox2 also. How
                is
                this done?
                Brian
                >>
                >On your second form,
                >textbox2.tex t = form1.textbox1. text should do the trick in any control
                >event you desire, however you may want to put this in textbox2's
                >textchanged event to equalise in every type attempt on textbox2.
                >>
                >Hope this helps,
                >>
                >Onur
                >
                You can add event handler to call event, however you can equalise
                textboxes in form_load as you've done. When do you want to equalise
                two textboxes?
                >

                Comment

                • Brian S.

                  #9
                  Re: From Inherits

                  ok.. think i have this.. so far so good.. hopfully.. i went into Form1's
                  Private Sub InitializeCompo nent() and found the delareration for textbox1
                  which was

                  Friend WithEvents TextBox1 As System.Windows. Forms.TextBox and change it
                  to

                  Protected WithEvents TextBox1 As System.Windows. Forms.TextBox

                  "Brian S." <bsgallatin@com munity.nospamwr ote in message
                  news:OXJWhLDoIH A.1240@TK2MSFTN GP02.phx.gbl...
                  Ok, thought I had this but I don't... when i look at the form2(child) I
                  get errors about not being displayed.....
                  This should be simple, but I am not seeing it....
                  when I click on calendar1 from form1 and the textbox1 changes...... I want
                  to know how I can
                  set the text in textbox2 on the form2 and how do I read the value of
                  textbox1 or the calender value from form2...
                  Please help :)
                  Brian
                  >
                  "Brian" <bsgallatin@com munity.nospamwr ote in message
                  news:%23Fo16g0n IHA.4864@TK2MSF TNGP05.phx.gbl. ..
                  >oK... Create a even for textbox1 in form2.. and instead of
                  >frmmain.textbo x1.text I used textbox1.text.. ....
                  >I got to thinking that it must copy the controls over as well.. that is
                  >why the default frist textbox I added was textbox2.
                  >Thanks for the help
                  > Brian
                  >"kimiraikkonen " <kimiraikkonen8 5@gmail.comwrot e in message
                  >news:d6b73be f-f896-49c2-a35e-19f0d56ec9c8@w8 g2000prd.google groups.com...
                  >On Apr 15, 6:29 pm, "Brian" <bsgalla...@com munity.nospamwr ote:
                  >>I did that on the form load.... what I need I suppose is access to the
                  >>event
                  >>handler for textbox1?
                  >>>
                  >>Me.TextBox2.T ext = frmMain.TextBox 1.Text
                  >>>
                  >>"kimiraikkone n" <kimiraikkone.. .@gmail.comwrot e in message
                  >>>
                  >>news:979f0c 01-db03-4e64-854c-b64f4d7f4ef4@n1 g2000prb.google groups.com...
                  >>On Apr 15, 6:02 pm, "Brian" <bsgalla...@com munity.nospamwr ote:
                  >>>
                  >Hi,
                  >playing around i created a form that has a calendar and a textbox1.
                  >I created another from that inherits from form1. on this second form I
                  >put
                  >another textbox(textbox 2). Now, on the second from when the value in
                  >the
                  >form1.textbo x1 changes, I want it to be displayed in textbox2 also.
                  >How is
                  >this done?
                  >Brian
                  >>>
                  >>On your second form,
                  >>textbox2.te xt = form1.textbox1. text should do the trick in any control
                  >>event you desire, however you may want to put this in textbox2's
                  >>textchanged event to equalise in every type attempt on textbox2.
                  >>>
                  >>Hope this helps,
                  >>>
                  >>Onur
                  >>
                  >You can add event handler to call event, however you can equalise
                  >textboxes in form_load as you've done. When do you want to equalise
                  >two textboxes?
                  >>
                  >
                  >

                  Comment

                  • Brian S.

                    #10
                    Re: From Inherits

                    lol... i didn't relize... it under the properties... called modifiers...
                    :(.. hey.. got to start somewhere..

                    "Brian S." <bsgallatin@com munity.nospamwr ote in message
                    news:OXJWhLDoIH A.1240@TK2MSFTN GP02.phx.gbl...
                    Ok, thought I had this but I don't... when i look at the form2(child) I
                    get errors about not being displayed.....
                    This should be simple, but I am not seeing it....
                    when I click on calendar1 from form1 and the textbox1 changes...... I want
                    to know how I can
                    set the text in textbox2 on the form2 and how do I read the value of
                    textbox1 or the calender value from form2...
                    Please help :)
                    Brian
                    >
                    "Brian" <bsgallatin@com munity.nospamwr ote in message
                    news:%23Fo16g0n IHA.4864@TK2MSF TNGP05.phx.gbl. ..
                    >oK... Create a even for textbox1 in form2.. and instead of
                    >frmmain.textbo x1.text I used textbox1.text.. ....
                    >I got to thinking that it must copy the controls over as well.. that is
                    >why the default frist textbox I added was textbox2.
                    >Thanks for the help
                    > Brian
                    >"kimiraikkonen " <kimiraikkonen8 5@gmail.comwrot e in message
                    >news:d6b73be f-f896-49c2-a35e-19f0d56ec9c8@w8 g2000prd.google groups.com...
                    >On Apr 15, 6:29 pm, "Brian" <bsgalla...@com munity.nospamwr ote:
                    >>I did that on the form load.... what I need I suppose is access to the
                    >>event
                    >>handler for textbox1?
                    >>>
                    >>Me.TextBox2.T ext = frmMain.TextBox 1.Text
                    >>>
                    >>"kimiraikkone n" <kimiraikkone.. .@gmail.comwrot e in message
                    >>>
                    >>news:979f0c 01-db03-4e64-854c-b64f4d7f4ef4@n1 g2000prb.google groups.com...
                    >>On Apr 15, 6:02 pm, "Brian" <bsgalla...@com munity.nospamwr ote:
                    >>>
                    >Hi,
                    >playing around i created a form that has a calendar and a textbox1.
                    >I created another from that inherits from form1. on this second form I
                    >put
                    >another textbox(textbox 2). Now, on the second from when the value in
                    >the
                    >form1.textbo x1 changes, I want it to be displayed in textbox2 also.
                    >How is
                    >this done?
                    >Brian
                    >>>
                    >>On your second form,
                    >>textbox2.te xt = form1.textbox1. text should do the trick in any control
                    >>event you desire, however you may want to put this in textbox2's
                    >>textchanged event to equalise in every type attempt on textbox2.
                    >>>
                    >>Hope this helps,
                    >>>
                    >>Onur
                    >>
                    >You can add event handler to call event, however you can equalise
                    >textboxes in form_load as you've done. When do you want to equalise
                    >two textboxes?
                    >>
                    >
                    >

                    Comment

                    Working...