VB2005: get value from other form

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

    #1

    VB2005: get value from other form

    Hello,

    Using VB2005 I have created two windows using design. Form2 has textbox. I
    load form2 in form1 using form2.show. Now, how do I get from2's textbox
    value.

    in form1 form2.textbox1. text should get value right?

    Please void showing examples with creating forms programmaticall y that
    confuses even more.

    Thanks
    Kris


  • =?Utf-8?B?S2VycnkgTW9vcm1hbg==?=

    #2
    RE: VB2005: get value from other form

    Kris,

    That should work. If it is not working, post some code.

    Kerry Moorman


    "Krishna" wrote:
    Hello,
    >
    Using VB2005 I have created two windows using design. Form2 has textbox. I
    load form2 in form1 using form2.show. Now, how do I get from2's textbox
    value.
    >
    in form1 form2.textbox1. text should get value right?
    >
    Please void showing examples with creating forms programmaticall y that
    confuses even more.
    >
    Thanks
    Kris
    >
    >
    >

    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: VB2005: get value from other form

      "Krishna" <k_mrNOSPAM@yah oo.comschrieb:
      Using VB2005 I have created two windows using design. Form2 has textbox. I
      load form2 in form1 using form2.show. Now, how do I get from2's textbox
      value.
      >
      in form1 form2.textbox1. text should get value right?
      Yes, basically that should work.

      \\\
      Dim f As New Form2()
      f.Show()
      ....
      MsgBox(f.TextBo x1.Text)
      ///

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      • Krishna

        #4
        Re: VB2005: get value from other form

        Kerry,

        That worked. But in my hasty I posted this 'coz I couldn't reference it in
        debug mode (quickwatch). Sorry for that.
        Can you tell why quickwatch cann't get the object?

        Thanks,
        Kris


        Comment

        Working...