如何用vb 打印出心形图案 用“*”打印 在线等 急!
2012-12-26
展开全部
Private Sub Form_Load()
Me.AutoRedraw = True
Me.Width = 5000
Me.Height = 5500
Me.ForeColor = vbRed
Me.FontSize = 12
Me.Scale (-10, 10)-(10, -10)
For i = 0 To 3.1415926 Step 0.2
CurrentX = -Cos(i) * 4 - 4
CurrentY = Sin(i) * 4 + 3
Print "*"
CurrentX = Cos(i) * 4 + 4
CurrentY = Sin(i) * 4 + 3
Print "*"
Next i
For i = 0 To 8 Step 0.5
CurrentX = 8 - i
CurrentY = -i + 2
Print "*"
CurrentX = i - 8
CurrentY = -i + 2
Print "*"
Next i
End Sub
Me.AutoRedraw = True
Me.Width = 5000
Me.Height = 5500
Me.ForeColor = vbRed
Me.FontSize = 12
Me.Scale (-10, 10)-(10, -10)
For i = 0 To 3.1415926 Step 0.2
CurrentX = -Cos(i) * 4 - 4
CurrentY = Sin(i) * 4 + 3
Print "*"
CurrentX = Cos(i) * 4 + 4
CurrentY = Sin(i) * 4 + 3
Print "*"
Next i
For i = 0 To 8 Step 0.5
CurrentX = 8 - i
CurrentY = -i + 2
Print "*"
CurrentX = i - 8
CurrentY = -i + 2
Print "*"
Next i
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询