Option Explicit
Dim A(4, 4) As Integer
Private Sub command1_click()
Dim i As Integer, j As Integer
Picture1.Cls
Randomize
For i = 0 To 4
For j = 0 To 4
A(i, j) = Int(Rnd * 90 + 10)
Picture1.Print A(i, j);
Next j
Picture1.Print
Next i
End Sub
Private Sub Findmax(A() As Integer, H As Integer, L As Integer)
Dim i As Integer, j As Integer, max As Integer
max = 0
For i = 0 To 4
For j = 0 To 4
If A(i, j) > max Then
max = A(i, j)
H = i
L = j
End If
Next j
Next i
End Sub
Private Sub Command2_Click()
Dim H As Integer, L As Integer
Findmax A(), H, L
Text1.Text = CStr(A(H, L)) & Str(H + 1) & "行" & Str(L + 1) & "列"
End Sub