Form1
Public an As String
Public Sub ProduceOrder_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
an=2
End Sub
Form2
Private Sub InOutApp_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim po As New ProduceOrder
'Form1 的对象
po.Visible = True[/color:43abfaa218]
MsgBox(po.an)
End Sub
就是这样,Form2里的不到Form1的那个值
注意红色的,也就是说po已经创建了,但没有加载,需要加载才行。