VB的做动画问题

[复制链接]
查看11 | 回复1 | 2008-1-9 21:29:43 | 显示全部楼层 |阅读模式
用另一种方法实现: Dim i As IntegerPrivate Sub Command1_Click()If Command1.Caption = "go" ThenTimer1.Interval = 100Command1.Caption = "pause"ElseTimer1.Enabled = FalseCommand1.Caption = "go"Timer1.Interval = 0End IfEnd SubPrivate Sub Form_Load()Timer1.Interval = 0End SubPrivate Sub Timer1_Timer()image1.Left = image1.Left + 100image1.Top = image1.Top + 50End Sub
回复

使用道具 举报

千问 | 2008-1-9 21:29:43 | 显示全部楼层
Dim i As IntegerPrivate Sub Command1_Click()If Command1.Caption = "go" Theni = 0Timer1.Enabled = TrueCommand1.Caption = "pause"ElseTimer1.Enabled = FalseCommand1.Caption = "go"End IfEnd SubPrivate Sub Form_Load()For i = 1 To 6Image1(i).Stretch = TrueImage1(i).Picture = LoadPicture(i & ".bmp")NextFor i = 1 To 6Image1(i).Visible = FalseNextEnd SubPrivate Sub Timer1_Timer()i = i + 1Select Case i Case 1Image1(6).Visible = FalseImage1(1).Visible = True Case ElseImage1(i - 1).Visible = FalseImage1(i).Visible = TrueIf i = 6 Then i = 0End SelectEnd Sub
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行