I need to pass a value from one TextBox on a Windows Form to another
TextBox
on another Windows Form . I am rather new to VB.net and I am having
difficulty performing this task. Any help is greatly appreciated.
Depending on how the forms are related:
If they both have a common parent:
Pass the parent as a parameter when you create Form1. Then when you need
to pass some value on to Form2, call a method on the parent and have the
parent forward the value to Form2.
If Form2 is the parent of Form1:
Same thing, pass Form2 as a parameter when creating Form1.
Unless you want to obtain the value of the textbox using Form1 as a popup
dialog. Then either make the textbox public (not recommended), or store
the content of the textbox in a public variable on Form1, or make a
property on Form1 that will give the value of the textbox (recommended)