I have a 3 Dimension Array and would like to get the value of each element
I would rather not use a For Next Loop to get the element values
The 3D Array will hold Integers but I am testing with the Array declared as Objects
I can get all three elements and really do not want to play with the Substring method
Here is the code I have thus far
Dim arrInfo(30, 30, 30) As Object
Dim V, X, Y As Object
arrInfo(0, 0, 0) = (1, 42, 70)
V = arrInfo(0, 0, 0)
tbOne.Text = V.ToString
Tried this same results
tbTwo.Text = arrInfo.GetValue(index1:=0, index2:=0, index3:=0).ToString
Both produce (1, 42, 70)
Now How do I get each element as a value?
I am trying to use a 3D Array to set X & Y coordinates of where to print on 8.5 X 11 Sheet of Avery Label's I set the data to be printed when I click on a Button
In the past VB 6 I had a Variant Array so the reason for the 3D Array is to set the values for the individual labels
Here is the code that sets the label information when a Button is clicked and values to be printed are used in the pdDoc print method
Private Sub btnThree_Click(sender As Object, e As EventArgs) Handles btn3.Click
btn3.Enabled = False
cinemas(2, 2) = 580
cinemas(2, 3) = 70
lblArray(2) = gv_FN & " " & gv_LN & vbNewLine & gv_AD & vbNewLine & gv_CT & ", " & gv_ST & " " & gv_ZP
End Sub
If Z = 2 Then
X = cinemas(2, 2)
Y = cinemas(2, 3)
e.Graphics.DrawString(lblArray(2), labelFont, Brushes.Black, X, Y)
End If
The first value in arrInfo(0,0,0) is the integer I want to use for lblArray(2) The idea was to remove the 2D Array cinemas(2,2) and capture all three variables from arrInfo(0,0,0)
