Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim i, j As Integer, m As Integer
        Dim str1 As String
        str1 = ""
        For i = 1 To 5
            m = 65                               'm中存放"A"的ASCII码
            str1 = str1 & Space(10 - 2 * i)    '每行前的空格
            For j = 1 To 2 * i - 1
                str1 = str1 & Chr(m) & " " '将ASCII码为m的转化为字母连接到str1中
                m = m + 1                    '得到下一个字母的ASCII码
            Next
            str1 = str1 & vbCrLf
        Next
        MsgBox(str1, , "输出图形")
    End Sub
End Class
