How do I...

11-12-2001, 01:37 PM
Currently, my graphics are VERY rudimentary. I have created a shape and two timers. When timer1 kicks off I create another shape as part of a control array:

load shape1(i) 'where i is a rolling counter
shape1(i).top = 0

When timer2 kicks off, it updates the position of all the existing shapes on the screen for falling with gravity.

When I saw the posts about using the picturebox, I thought it would be neat to try it, but I'm a little fuzzy about where to start.

Should I continue to use the shape object or should I use circles and lines?

Is there some sample code I could play with that some one could point me to?

This is fun...


11-13-2001, 05:07 PM
Describe what you are trying to achieve and someone will suggest the best (in their opinion) method or methods for doing it.

If you're only drawing one or two shapes - the shape control would be better - less memory, however, if youre using graphics then the picturebox might be better. It all depends...


wild wolf
11-15-2001, 12:31 AM
please be more clear on what u want to do, maybe u could attach ur current file with a post

11-15-2001, 08:34 PM

I've attached my waterfall program. The slider determines the amount of horizontal randomness. This uses the shape object on a form and timers. As I add more and more shapes, things get jumpy and it seems that I see 'echos' of the objects as they move...

I'm working on using the PictureBox with Circles (instead of shape objects) and instead of using timers, I'm trying the 'hard loop in the Resize sub' that's in the Code Examples(games) section in the VB-Extreme home page. I've taken out the AutoRedraw and Removed all my refreshes, but it's still very jumpy.

Anyway, check out my waterfall and point me in the right direction...

11-16-2001, 05:09 AM
Great program, I like it....... I tinkered with it for a while and attatched what I did. Change the value of the constants to alter the settings. I tried to comment it, hope you can understand it, and most of all hope it is of use to you. It seemed to avoid the flicker it was experiencing and allowed more particles. Of course, there are sill other methods.

Enjoy....... images/icons/wink.gif

11-16-2001, 05:22 AM seem to have forgotten the attachment Squirm....

11-16-2001, 05:27 AM
So it would seem....... trying again........

wild wolf
11-19-2001, 12:34 AM
great program squirm, its solved the flicker problem and yeah the coding is more clear

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum