Need help displaying animations in VB!

JamesTheGreat
01-27-2002, 04:56 AM
I have made a game which has moving water that needs to be updated every second or so. However everytime we redraw the screen you can see the progress of the redraw. I can't figure out how to draw the image in the background and then display it in a completed form. I have tried making a picturebox array and flipping through it but VB for some reason refuses to display the content of these pictureboxes when you do that even with a DoEvents.

Any ideas suggestions???

Thanks,
James

Ales Zigon
01-27-2002, 05:18 AM
You can use a second picture (invisible), draw what you want in there and the paint it to the main picture. Like this:


Picture1.PaintPicture Picture2.Picture, 0, 0, Picture1.Width, Picture1.Height

JamesTheGreat
01-27-2002, 05:40 AM
When I use your method I get an "invalid image" error. The image is a custom image draw on the second picturebox using the Polygon API call.

Squirm
01-27-2002, 12:58 PM
Try drawing the image (using the Polygon API) onto an invisible StdPicture then BitBlt the image onto the form after the drawing is complete.

JamesTheGreat
01-28-2002, 11:19 PM
thanks bitblt works perfectly

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum