RC6 provides a very magical object DynObj, which can dynamically add properties and methods like JavaScript objects, for example:
If I could use VB6 to achieve a feature/class similar to RC6.DynObj too, it'll greatly promote my work. I'd like to know if anyone other than Olaf has implemented a similar feature? If anyone could provide some suggestions and help, it would be greatly appreciated.
Code:
Private Sub Form_Load()
Dim oDyn As Object
Set oDyn = New_c.DynObj
oDyn.a = 123
oDyn.b = "xyz"
oDyn.c = True
'Ok, readout-tests:
Debug.Print oDyn.a, oDyn.b, oDyn.c
End Sub