用VB编写程序,在窗体上输出一个平行四边形
2018-12-02
展开全部
Private Sub Command1_Click()
Dim s As String
s = InputBox("请输入打印的字符:", , "#")
PrintShape 8, s
End Sub
Sub PrintShape(ByVal k As Integer, ByVal c As String)
Dim i, j As Integer, s As String
c = Chr(Asc(c))
For i = 0 To k
s = Space(i)
For j = 0 To 8
s = s & c
Next j
Me.Print s
Next i
End Sub
Dim s As String
s = InputBox("请输入打印的字符:", , "#")
PrintShape 8, s
End Sub
Sub PrintShape(ByVal k As Integer, ByVal c As String)
Dim i, j As Integer, s As String
c = Chr(Asc(c))
For i = 0 To k
s = Space(i)
For j = 0 To 8
s = s & c
Next j
Me.Print s
Next i
End Sub
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询