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?
Printable View
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?
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.
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.
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.