有两种方法:
1.添加一个标准模块(Module),在其中定义变量。如Public t1 As String然后在frmother窗体中给这个变量赋值,这样就可以在frminput窗体取得这个变量的值了。
2.先定义窗体之间的引用,如:
在'///frminput窗体中写:
Public frmother as new frmother
在'///frmother窗体中写:
Public frminput as new frminput
frminput.frmother=me
然后在frminput就可以调用frmother中的过程、函数、控件。。。
比如想取frmother中的TextBox1的值:frmother.TextBox1.text