animating a crab?

jessica
07-18-2003, 07:10 AM
when i use the image to import in the crab's picture how do i get rid of the white background. and also how do i animate the crab when the user presses the left and left button of som other button so that the crab is able to rotate. i have already imported all the pictures of the crab in different positions and i have also tried to use the visible command but it didn't really work out as what i wanted

Werdna
07-18-2003, 07:18 AM
If you make the white background transparent in Paint Shop Pro or Photoshop or something and import it into an image control it will be transparent.
I assume you tried to have several image controls and make them visible and invisible? Instead you could use the LoadPicture function to change the picture, like
Image1.Picture = LoadPicture("C:\Vb\Crab1.Gif")
or whatever the path may be.

SpaceFrog
07-18-2003, 08:00 AM
Best results for gif annimation in VB will be obtained with GIF89.dll

a quick search on google, download the file, place the control on your form and you're done ...

jessica
07-18-2003, 08:39 AM
are there any sample codes for me to refer to to animate a crab or somthing else

SpaceFrog
07-18-2003, 08:49 AM
Using an animated .gif with gif89.dll is not satisfactory ???

Diurnal
07-18-2003, 09:49 AM
Jessica:
If you are willing to use the API and your image is a bitmap, you can try the BitBlt function. There is a good tutorial here (http://www.vbexplorer.com/VBExplorer/gdi.asp). Also, try searching the forums for animation and bitmap use.
Marty

ImmortalWarrior
07-18-2003, 09:52 AM
Only problem with using transparent gifs is that god awful flickering...
Animated GIF controls are useful if you don't mind flickering, but if you want to get rid of that, I suggest placing your images in a collection or array, and looking into API functions (BitBlt, CreateCompatibleDC, CreateCompatibleBitmap in particular) and some TransparentBlt Methods..
Matt

(Beat me to it Diurnal :chuckle: )

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum