VBNET在不同窗體之間傳遞參數有哪幾種方法?
利用全局變量
利用控件屬性
在vb.net中兩個窗體間的變量可以相互引用了
例如:可以這樣用
Public Class Form1
Public asd As Integer
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
asd = 123
End Sub
End Class
Public Class Form2
Private Sub Form2_Click(sender As Object, e As System.EventArgs) Handles Me.Click
TextBox1.Text = Form1.asd
End Sub
End Class