您的位置:首页 > 其它

生成能动图形

2012-05-30 16:53 155 查看
Dim gAs Boolean
Dim xAs Long
    再双击开始运动按钮,编写程序语言
PrivateSub Command1_Click()
Timer1.Enabled= True
End Sub
    再双击窗体,编写程序语言
Private Sub Form_Load()
g = True
x = Shape1.Left
End Sub
    再双击闹钟,编写程序语言
Private Sub Timer1_Timer()
If g Then
x = x - 300
Else
x = x + 300
End If
 If x < 0 Or x > (Me.ScaleWidth - Shape1.Width)Then
g = Not g
End If
 Shape1.Move x
 End Sub
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  timer 语言 command 图形