>>798 以下のようなコードです。全部は書ききれませんので、次レスで。 Const N As Short = 4 Dim p(N) As Integer Private Sub perm(ByRef i As Integer, ByVal e As PictureBox) Dim g As Graphics = e.CreateGraphics() Dim t As Integer Dim j As Integer If i < N Then For j = i To N t = p(i) p(i) = p(j) p(j) = t perm(i + 1, Picture1) t = p(i) p(i) = p(j) p(j) = t Next j Else For j = 1 To N Dim centuryFont As Font = New Font("century", 8, FontStyle.Regular) Dim blackBrush As SolidBrush = New SolidBrush(Color.Black) g.DrawString(p(j), centuryFont, blackBrush, p(j) * 20, j * Font.Height) Next j End If End Sub