这是我的代码
form1:
public sometext as string
form2:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
textbox1.text = form1.sometext
End Sub
答案 0 :(得分:0)
表格1:
Dim Obj as New Form2
Obj.Str = 'some variable in form 1'
Obj.Show
Me.Hide
表格2:
Public Property Str as String
Textbox1.text = Str
有关详细信息,请查看以下链接:How to pass value of a textbox from one form to another form