pro22
gestione matrici
VISUAL BASIC creare PULSANTE per istruzioni e 8 caselle label
PULSANTE |
Private Sub CommandButton1_Click() Dim matrice(2, 2) As Integer Dim r, c As Integer matrice(1, 1) = Label1.Caption matrice(1, 2) = Label2.Caption matrice(2, 1) = Label3.Caption matrice(2, 2) = Label4.Caption Label5.Caption = matrice(1, 1) Label6.Caption = matrice(1, 2) Label7.Caption = matrice(2, 1) Label8.Caption = matrice(2, 2) End Sub
scrivere valori in label 1,2,3,4 e visualizzarli in label 5,6,7,8
label1 | label2 | label5 | label6 | |
label3 | label4 | label7 | label8 |
10 | 30 | 10 | 30 | |
20...... | 40..... | 20..... | 40.... |