Textbox

  • Thread starter Thread starter metas
  • Start date Start date
M

metas

there is a TextBox control in Form1.
when i am in Form2, how can i write TextBox in Form1.

i tried that below;
when the button in Form2 is Clicked

dim obj as new form1
obj.textbox1.text="blabla"

it doesn't give any error but it doesn't make TextBox1.Text change...

thank you for your helping
 
* "metas said:
there is a TextBox control in Form1.
when i am in Form2, how can i write TextBox in Form1.

i tried that below;
when the button in Form2 is Clicked

dim obj as new form1
obj.textbox1.text="blabla"

it doesn't give any error but it doesn't make TextBox1.Text change...

You wiull need to pass a reference to your form or control to the other
form in order to access the form or control:

<URL:http://groups.google.de/[email protected]>
 
Hi,

Pass a reference to form1 when you open form2. You are creating a
new form1 and changing textbox1.text on a new form that you didnt show yet.

Ken
-------------
there is a TextBox control in Form1.
when i am in Form2, how can i write TextBox in Form1.

i tried that below;
when the button in Form2 is Clicked

dim obj as new form1
obj.textbox1.text="blabla"

it doesn't give any error but it doesn't make TextBox1.Text change...

thank you for your helping
 
Back
Top