|
-
Jul 17th, 2006, 10:05 PM
#1
Thread Starter
Hyperactive Member
Change textbox.Text from another form
Hi,
I have 2 forms.
frmMain is the startup form, it has a button and a textbox. The button loads & shows frmCustomer (so now frmCustomer is on top of frmMain)
Now from frmCustomer I want to change contents of textbox on frmMain.
Is it possible?
-
Jul 17th, 2006, 10:16 PM
#2
Re: Change textbox.Text from another form
Congratulations! You're our 1 millionth customer to ask that question. Maybe that's an exaggeration but that question, or at least questions where the principle is accessing members of one form from another form, are possibly the most oftened asked on this forum. Forms are objects and they obey the same rules as all other objects in VB.NET. I suggest that you read the "Forms in VB.NET" tutorial in my signature.
-
Jul 17th, 2006, 10:35 PM
#3
Thread Starter
Hyperactive Member
Re: Change textbox.Text from another form
Sorry about that, but I couldn't come up with a good "search phrase" so I started a post where I could explain what I'm after.
I'll read your tutorial, however for the time you spent writing your response, you could have just show me the line of code that I needed.
-
Jul 17th, 2006, 10:56 PM
#4
Re: Change textbox.Text from another form
What makes you think it would be just one line of code? Besides, learning by doing is always better than just copying and pasting, when people usually put their brain in neutral and often gain no real understanding of what the code does. Also, that tutorial contains a great deal of valuable information that will answer many questions besides the current one and should be required reading for all new Vb.NET developers. If you learn the principles then you can apply them to many similar situations. I'm a big fan of pointing people in the right direction and then encouraging them to use the information they find to work the problem out for themselves. It may take longer but you learn more and you also get better at problem solving, which means you're more able to solve your own problems in the future.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|