VB 怎么实现Picture的画图

来源:百度知道 编辑:UC知道 时间:2024/07/02 00:16:04
在一个长方形的Picture里面画个圆
让它每秒移动 从Picture头慢慢移动到尾.

谢谢
实心圆。。谢谢

Dim x As Integer
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 1000
x = 750
End Sub

Private Sub Timer1_Timer()
Picture1.Cls
Picture1.Circle (x, 1000), 750
x = x + 100
If x + 750 >= Picture1.ScaleWidth Then x = 750
End Sub

设置timer1.Interval =1000
Private Sub Timer1_Timer()
Static x As Integer, y As Integer, a As Integer
Dim r As Integer
Picture1.Cls
r = 200
x = x + r
If y = 0 Then y = r
If x > Picture1.Width Then
x = r
a = a + 1
y = (a + 1) * r
If y >= Picture1.Height - r Then y = r: a = 0
End If
Picture1.Circle (x, y), r
End Sub