Dim InstanceA As Instance Dim InstanceB As Instance Set InstanceA = New Instance Call InstanceA.Init(1, 1) Call InstanceA.SetValue(1, 10) Set InstanceB = New Instance Call InstanceB.Init(2, 2) Call InstanceB.SetValue(1, 100) Call InstanceB.SetValue(2, 200) Dim Tmp As Instance Set Tmp = InstanceA Set InstanceA = InstanceB Set InstanceB = Tmp Debug.Print InstanceA.InstanceID Debug.Print InstanceB.InstanceID Debug.Print InstanceA.GetValue(1) Debug.Print InstanceA.GetValue(2)
Showing posts with label VB. Show all posts
Showing posts with label VB. Show all posts
2012/12/20
VB 6.0 交換兩個相同 Object
Subscribe to:
Posts (Atom)