Simple Animation Example in VB
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
6 posts
Page 1 of 1
Hi All
Here is an easy Tutorial on Simple Animation in VB.
You can use this as an Example, but of course you can make it as elaborate as you like, I am just outlining the basics here, the rest is up too you ;)
For this Example we will use.
3 Picturebox's and 3 Timers
1. Make your Pictures you are going to use all the same size ( only for this Example )
and add 3 Picturebox's to your Form, and put a picture in each Picturebox so that that each picture sits central.
2. Put the First picturebox on the Bottom and the other 2 will go on top of each other ( Centrally )
3. Make all Picturebox's =Visible=TRUE in the Properties
4. Now add 3 Timers to your form ( all are ENABLED and set the INTERVALS on all the Timers too ( 500 )
Now for the code
Form Load Code
The Clouds will move across the screen when used with this code Above.
And that is it, Its as Easy as that cooll;
Enjoy
Chris
Here is an easy Tutorial on Simple Animation in VB.
You can use this as an Example, but of course you can make it as elaborate as you like, I am just outlining the basics here, the rest is up too you ;)
For this Example we will use.
3 Picturebox's and 3 Timers
1. Make your Pictures you are going to use all the same size ( only for this Example )
and add 3 Picturebox's to your Form, and put a picture in each Picturebox so that that each picture sits central.
2. Put the First picturebox on the Bottom and the other 2 will go on top of each other ( Centrally )
3. Make all Picturebox's =Visible=TRUE in the Properties
4. Now add 3 Timers to your form ( all are ENABLED and set the INTERVALS on all the Timers too ( 500 )
Now for the code
Form Load Code
Code: Select all
Timer 1 Code
Timer2.Enabled = False
Timer3.Enabled = False
Code: Select all
Timer 2 Code
PictureBox3.Visible = False
PictureBox1.Visible = True
Timer2.Enabled = True
Timer1.Enabled = False
Code: Select all
Timer 3 Code
PictureBox1.Visible = False
PictureBox2.Visible = True
Timer3.Enabled = True
Timer2.Enabled = False
Code: Select all
These images below are used to show you an Example. PictureBox2.Visible = False
PictureBox3.Visible = True
Timer1.Enabled = True
Timer3.Enabled = False
The Clouds will move across the screen when used with this code Above.
And that is it, Its as Easy as that cooll;
Enjoy
Chris
Nice bit of coad mate realy easy do thanks's mate ;)
Back Aegean sorry not been on i.v just been moving.
Instead of making 3 timers you could use the "Elseif", something like:
Code: Select all
If Picturebox1.image = balbla then
blabla
elseif picturebox1.image = blabal2
balbla
elseif picturebox1.image = balblabla3
balbalbla
endif
Hi Nery
A good point there cooll;
Now why didnt i think of that first :oops:
Cheers
Chris
A good point there cooll;
Now why didnt i think of that first :oops:
Cheers
Chris
6 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023