Link to home
Start Free TrialLog in
Avatar of Peanuthead
Peanuthead

asked on

Simple animations...tell me EVERYTHING

Hello...this is a REALLY easy question that i want explained in lots of detail for me to accept your answer.  I want to know exactly how to use bitmaps to create animations.  Keep in mind...i dont know how to use the move command...dont make any statements assuming i know what im doing...cause i barely do....ive only been doing visual basic for a month...and thats only been semi-simple stuff....so speak as if im a child...exact code helps, along with comments to explain the code...this questions worth alot...so im expecting alot.
Avatar of KEWL
KEWL

first create an 'image' control on the form called 'img' and place it where you want to show the animation

then create another one with the same name and click 'yes' when the box pops up. set the property 'visible' to false

then use the folowing code

numframes= [ enter number of frames here ]
for a = 1 to numframes
on error resume next
load img(a)
img(a).picture=loadpicture("image" + str(a) + ".bmp")
next a

do
for a = 1 to numframes
img(0).picture=img(a).picture
img(0).left=img(0).left + 10
next a
loop

that will make the animation move across the form.
p.s I have assumed the images are image1.bmp image2.bmp etc

it is also an infinite loop.if you have a problem with that, and cant fix it yourself, leave a comment here, and i will tell you.

 I better post this messge b4 any one else does eh!




Avatar of Peanuthead

ASKER

I need more info.....I need to know first off where to put da code...in form load or in picture click?  Also, what directory must the pics be stored in.  How do i make it a not-unlimited loop also....ill need to know that.
Anyone else know better how 2 explain?
simple, just like drawing cartoon, you draw a few picture with each one move a little bit or change a bit (using any drawing program you prefer or just draw and scan it).

than put one picturebox for each of your image, if you got ten image, then put ten picturebox into VB form (form1).

1. put all the pictureboxs at the same place and with same size.
2. make all the picturebox visible to false, so you won't see anything in screen.
3. than at form load event or at button, make the picturebox display one by one, each time only one picturebox is visible.

thanks
keong

I need more specific...like how to make it all into one function.  I also need to know HOW to make them display one by one....u need to assume that im stupid....heh
ASKER CERTIFIED SOLUTION
Avatar of Brian Mulder
Brian Mulder
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks for the points
:O)
br(UINT)je