Design one small application of animation using picture control and write appropriate code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
Public Class Form1 Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick PictureBox1.SizeMode = PictureBoxSizeMode.CenterImage End Sub Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick PictureBox1.SizeMode = PictureBoxSizeMode.Zoom End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Timer1.Interval = 200 Timer1.Start() Timer2.Interval = 120 Timer2.Start() End Sub End Class |