vb中在任意位置画空心圆,半径不超过500,颜色随机变化
展开全部
Private Sub Form_Click() '点击窗体一次画一个圆
Dim xx As Single, yy As Single, rr As Single, cc As Long
Randomize
xx = Me.ScaleWidth * Rnd '圆心x坐标
yy = Me.ScaleHeight * Rnd '圆心y坐标
rr = 500 * Rnd '半径
cc = 256& * 256 * 256 * Rnd '颜色
Me.Circle (xx, yy), rr, cc '画圆
End Sub
追问
如果是在定时器里呢?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询