I have some Arrays with Forms and that works fine. All the elements in any array are from the same Form (class).
I can access the Forms properties with Form(X).
I am now trying to craete a double array that will hold forms from diferent clases. I have defined the array like this
Friend Form(,) As Form.
And then later redefined it like this:
ReDim Form(NumFormSets, NumForms)
I create a form instance like this:
Form(1, 1) = New Form1()
Form(1, 2) = New Form2()
Form(2, 1) = New Form1()
Form(2, 2) = New Form2()
The purpose with all this is that I now can process all the forms using indexes in a very simple way.
But there seams to be some problems. One of them is that my array is of type Form. All the elements are of specific Form clases. I am trying to cast but dosent seam to get it right.
How can this be done?