Public Class Form2
Dim arreglo(0 To 3, 0 To 5)
Dim nro As Integer
Dim letra As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If CheckBox1.Checked = True Then
numeros()
ElseIf CheckBox2.Checked = True Then
End If
End Sub
Sub numeros()
For col = 0 To 3
For fil = 0 To 5
Randomize()
nro = (1 + Rnd() * 99)
arreglo(col, fil) = nro
Next
Next
For fil = 0 To 5
ListBox1.Items.Add(arreglo(0, fil) & "-" & arreglo(1, fil) & "-" & arreglo(2, fil) & "-" & arreglo(3, fil))
Next
End Sub
Sub posicion()
For col = 0 To 3
For fil = 0 To 5
arreglo(col, fil) = arreglo(Mid(TextBox1.Text, 1, 1), Mid(TextBox1.Text, 3, 1))
nro = arreglo(col, fil)
Label4.Text = nro
Next
Next
End Sub
Sub letras()
For col = 0 To 3
For fil = 0 To 5
letra = InputBox("ingrese la letra")
arreglo(col, fil) = letra
Next
Next
For fil = 0 To 5
ListBox1.Items.Add(arreglo(0, fil) & "-" & arreglo(1, fil) & "-" & arreglo(2, fil) & "-" & arreglo(3, fil))
Next
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
posicion()
End Sub
End Class
No hay comentarios:
Publicar un comentario