Image List

Started by
23 comments, last by Daboy 22 years, 4 months ago
Lol ok dude thats perfect but now how can i get it so that it stops after 1 run??? and is there a way i can get it to take the images out of an image list?? Right now i think its taking it from teh file .. i think but i need it to take liek 6 form an image list and than stop... THANKS AGAIN
Advertisement
Alimonster,

you''ve the patience of an oyster!

I''m charging by the hour, don''t worry .

Right, I can sort out this request. I''ll have an example project up in about 1-and-a-half to 2 hours from this post, when I get home. In the meantime:

1) You can use the old code from one of the (many) previous posts... I''m pretty sure they contain code that can help (for getting images from imagelists)
2) You can stop the animation when it ends by checking the index after you update the timer...

// in timer procedure bit
// ...get next pic
// ...if SomeIndex = a_magic_num then
// ... ... disable the timer

As I said, I''ll post another program in a short while.

Alistair Keys

P.S. My response time is getting pretty slow for the next few days. I''m snowed under with work at the mo.

"There are two kinds of people, those who finish what they start and so on."
-- Robert Byrne
I''m back, and the new program is up. Get it here (it''s Anim2 that I changed).

This one has a couple of checkboxes. The first is "Stop on Finish" and the second is "Reset on finish". That one sets the image back to the first one when it finishes, if StopOnFinish is set.

Things to note in the code:

The two new variables, "StopOnFinish" and "ResetOnFinish"
The extra code in the timer code
The SetFrameNumber procedure, added for completeness
** It gets the images from the ImageList now **

Alistair Keys

"There are two kinds of people, those who finish what they start and so on."
-- Robert Byrne
IT only took 20 some times!!!! Dude i owe u really bad....U truly know everything abotu Delphi and i truly dotn haha....but thx and i was wondering how come this makes the image look so bad???You cant tell what it is well my cannon and stuff but when im not using ur programs it works???? Ok well thx

This topic is closed to new replies.

Advertisement