Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hello

i have 2 forms called "form1" and "form2"

form2 has a textbox.

form1 has a button.

when i clicked to button how can i get the value of textbox on form2?

 

 

Code in Form1:

Dim form2 As New Form2()

MsgBox(form2.TextBox1.Text)

 

Code in Form2:

TextBox1.Text="HELP"

 

 

Please help me. This is very important for me......

  • *Experts*
Posted

If im understanding you correctly, and you set the value of the textbox in code in form load event so its executed right away then this should work.

Are you opening any instances before this one? What I mean by this is if you open any others and then you modify the textbox. If thats the case then it wont work becuase you create a new instance all the time.

Again, im not really sure what you want :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...