473,387 Members | 3,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

animations on visual basic

mrnn
29
hello i'm tryin to figure out how to make an animation w/o the timer loading up a separate pic every .1 of a second or watever...is there a way how to upload one image with multiple pics on it and have it only show certain parts of the pic? (like a pic that's 128X32, show the first 32X32 square, then the second starting at 64, 96, 128 then 0 again) or some other way that's less taxing on the speed?

i used to do it by loading a new pic every so often or having separate, invisible pics it'd take the pics from but that taxed the speed too much with 5 different animated pics at once...oh and i dont know anythin about animated GIF's :P
Sep 16 '07 #1
14 1870
hello i'm tryin to figure out how to make an animation w/o the timer loading up a separate pic every .1 of a second or watever...is there a way how to upload one image with multiple pics on it and have it only show certain parts of the pic? (like a pic that's 128X32, show the first 32X32 square, then the second starting at 64, 96, 128 then 0 again) or some other way that's less taxing on the speed?

i used to do it by loading a new pic every so often or having separate, invisible pics it'd take the pics from but that taxed the speed too much with 5 different animated pics at once...oh and i dont know anythin about animated GIF's :P
have you tried messing with the forms redraw method?

Expand|Select|Wrap|Line Numbers
  1. form1.redraw = false
  2. 'do your processing: swapping pics, for example. 
  3. form1.redraw = true. 
  4.  
Sep 16 '07 #2
Killer42
8,435 Expert 8TB
...is there a way how to upload one image with multiple pics on it and have it only show certain parts of the pic? (like a pic that's 128X32, show the first 32X32 square, then the second starting at 64, 96, 128 then 0 again) or some other way that's less taxing on the speed?
It sounds as though you're describing the ImageList control. :)

You might also want to look into the Animation control, which plays AVI files and possibly (I'm not sure) animated GIF files. (I know you said you didn't know about them, but any decent graphics program these days should be able to create them from your series of images.)
Sep 17 '07 #3
mrnn
29
It sounds as though you're describing the ImageList control. :)
I've heard of the ImageList control but i can't find it and dunno how it works X( ...i've tried finding something on it in the components list to add to the toolbar but i cant find it....and i've never heard of form redraw what is that about? as long as it doesnt take up too much processor speed my computer's too slow... (i've only been using visual basic 6 for 2 years, took a 1year class on it...just so u know:P)

oh and thanks for the help people :)
Sep 17 '07 #4
Killer42
8,435 Expert 8TB
I've heard of the ImageList control but i can't find it and dunno how it works X( ...i've tried finding something on it in the components list to add to the toolbar but i cant find it....and i've never heard of form redraw what is that about? as long as it doesnt take up too much processor speed my computer's too slow...
The Imagelist control is in the "Microsoft Windows Common Controls" library. I don't actually know much about it, but it is used to store a bunch of images for use in other controls.

I forget what else has been said here (in a real rush right now) but one option for animating is to simply have a bunch of Image controls in the same place, and either change their visibility one by one, or move each in turn to the front using the .ZOrder method.
Sep 18 '07 #5
mrnn
29
The Imagelist control is in the "Microsoft Windows Common Controls" library.
I've tried to find that but couldn't...is it in the "components" menu on the toolbar? Or what? Sorry I'm not the best at how VB works...
Sep 18 '07 #6
Killer42
8,435 Expert 8TB
I've tried to find that but couldn't...is it in the "components" menu on the toolbar? Or what? Sorry I'm not the best at how VB works...
If you're using VB6, then you pull down the "Project" menu and select "Components". Or just press the shortcut key, Ctrl-T.

If you're using a later version of VB, I have no idea of how you add components.
Sep 18 '07 #7
mrnn
29
oh found it...duh it was there all along i just forgot the word "windows" in there so i couldnt find it....sorry for being an airhead, i'll try my best not to ask another dumb question like that in the future

and thanks i really do appreciate the help :)
Sep 19 '07 #8
Killer42
8,435 Expert 8TB
No problem, glad to help. :)
Sep 19 '07 #9
mrnn
29
Ok sorry if I sound dumb here but...how do I get this imagelist control to work? As in, how do I load the pics from the imagelist? I got my pics in it I need but now I need to figure out how to use them

If this helps any the player you control is imgPlayer and the imagelist is PlayerList, index1 pic is standing still and index2-7 is running.
Sep 22 '07 #10
QVeen72
1,445 Expert 1GB
Hi,

After loading the Images to the ImageList, Place a Timer Control on the Form, and make Interval = 1000 ( 1 second). Also Place a PictureBox or Image Control. Keep a FormLevel Variable say ImgIndex as Integer
In Timer1_Timer Event, u can Load the Image from ImageList, Increment the Variable and Load next Image. When it Reaches 7, make it 0

REgards
Veena
Sep 22 '07 #11
mrnn
29
After loading the Images to the ImageList, Place a Timer ...
Not to sound rude but I already know that part, I just don't know how to load the images from the imagelist and put them in the image control.
Sep 22 '07 #12
Killer42
8,435 Expert 8TB
Not to sound rude but I already know that part, I just don't know how to load the images from the imagelist and put them in the image control.
Oh, how rude... 8-)

Seriously, though I haven't actually used it myself, from the doco I gather you would use something like...
Expand|Select|Wrap|Line Numbers
  1. Set imgPlayer.Picture = PlayerList.ListImages(1).Picture
I think I remember reading that you have to use Set in this case. Have a play with it, and also I suggest you look up the ImageList control in the doco. Just select imgPlayer on your form in design mode, and hit F1 - this should get you there.
Sep 22 '07 #13
mrnn
29
Oh, how rude... 8-)

Seriously, though I haven't actually used it myself, from the doco I gather you would use something like...
Expand|Select|Wrap|Line Numbers
  1. Set imgPlayer.Picture = PlayerList.ListImages(1).Picture
I think I remember reading that you have to use Set in this case. Have a play with it, and also I suggest you look up the ImageList control in the doco. Just select imgPlayer on your form in design mode, and hit F1 - this should get you there.
SWEET! thanks for the help man, really appreciate it :)
Sep 23 '07 #14
Killer42
8,435 Expert 8TB
SWEET! thanks for the help man, really appreciate it :)
Glad to help. :)
Sep 23 '07 #15

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Michel Gaudry | last post by:
Hello, I want to create a svg with multiple animations. It starts with <path> describing a Triangle and it's moved with a series of <animate>. An example : <path ...> <animate .../>...
1
by: dzemo | last post by:
I want to make some simple animations in program (for example when showing some piece of form or some information on click) but I don't know how. I can change left property of form but there are no...
2
by: frossberg | last post by:
Hello! I tried to install the Visual Basic.NET Resource Kit (http://msdn.microsoft.com/vbasic/vbrkit/) but obviously something went very wrong and now it sems impossible both to repair and to...
4
by: Fla | last post by:
Good morning. I'd like to know if I can use for free the animations, the bitmaps and the icons inside the archive VS2005ImageLibrary.zip in the installation path of VB2005 C:\Program...
2
by: Mike Stolkes | last post by:
I have the task to make 2 or 3 simple games, probably some shot them up game (space invaders or so) and a poker game. For this I need to move things around very quickly on the screen. So that is my...
97
by: Master Programmer | last post by:
An friend insider told me that VB is to be killled off within 18 months. I guess this makes sence now that C# is here. I believe it and am actualy surprised they ever even included it in VS 2003 in...
7
by: kvnsmnsn | last post by:
I've got two GIF files named "Tigger.gif" and "Angry_barbarian.gif" that contain animations that I want to display on a web page. I've written the following XHTML code which works for a fraction...
14
by: Mark | last post by:
I'm making a game. I need to maintain a bunch of objects, in this case animations (explosions and stuff). I've decided to use an STL vector. From my understanding, I need to declare it as...
4
by: =?Utf-8?B?dmluZWV0?= | last post by:
In WPF (even with considerable improvement in version 3.5), while running multiple animations in a single window, The performance of one animation suffers a lot. for example, i have two image...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.