Advertisement
TermSpar

VB Animation

Apr 7th, 2016
2,221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.69 KB | None | 0 0
  1. Public Class frmAnimation
  2.     Dim birdCount As Integer = 1
  3.  
  4.     Private Sub tmrAnimation_Tick(sender As System.Object, e As System.EventArgs) Handles tmrAnimation.Tick
  5.         Select Case birdCount
  6.             Case 1
  7.                 picBird.Image = My.Resources.bird1
  8.                 birdCount += 1
  9.             Case 2
  10.                 picBird.Image = My.Resources.bird2
  11.                 birdCount += 1
  12.             Case 3
  13.                 picBird.Image = My.Resources.bird3
  14.                 birdCount += 1
  15.             Case 4
  16.                 picBird.Image = My.Resources.bird4
  17.                 birdCount += 1
  18.             Case 5
  19.                 picBird.Image = My.Resources.bird5
  20.                 birdCount += 1
  21.             Case 6
  22.                 picBird.Image = My.Resources.bird6
  23.                 birdCount += 1
  24.             Case 7
  25.                 picBird.Image = My.Resources.bird7 'I forgot to create a bird7 for the video, but I made one after I filmed it
  26.                 birdCount += 1
  27.             Case 8
  28.                 picBird.Image = My.Resources.bird8
  29.                 birdCount += 1
  30.             Case 9
  31.                 picBird.Image = My.Resources.bird9
  32.                 birdCount += 1
  33.             Case 10
  34.                 picBird.Image = My.Resources.bird10
  35.                 birdCount += 1
  36.             Case 11
  37.                 picBird.Image = My.Resources.bird11
  38.                 birdCount += 1
  39.             Case 12
  40.                 picBird.Image = My.Resources.birdLast
  41.                 birdCount = 1
  42.         End Select
  43.     End Sub
  44.  
  45.     Private Sub frmAnimation_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
  46.         tmrAnimation.Start()
  47.     End Sub
  48. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement