Posted: Fri Jun 16, 2006 9:17 pm Post subject: Moving pictures in VB
I am making a game that is basically like fly ribbon. The only problem that I seem to be having with it is the pictures i am using continously flash as they move across the screen. I have made them quite small and reduced them to 8 bit colour but they still flash. Is there any way to fix this?
Thanks[/code]
Sponsor Sponsor
NikG
Posted: Fri Jun 16, 2006 11:01 pm Post subject: (No subject)
Add a timer control and use that to trigger the movement.
Drewbie
Posted: Sat Jun 17, 2006 10:29 am Post subject: (No subject)
this is pretty much the code i have for moving the objects
code:
Private Sub Timer1_Timer()
Picture1.Left = Picture1.Left - 10
End Sub
when the picture moves across the screen it flashes, showing the square area behind it. the picture file is currently a GIF and i believe it is fairly small in size. is ther any way to fix this?
cool dude
Posted: Sat Jun 17, 2006 10:48 am Post subject: (No subject)
when i take a random picture and do that it doesn't flash. post your program so i can see if there's anything else your doing to cause the flashing. also try this:
code:
Picture1.Move Picture1.Left - 10
cool dude
Posted: Sat Jun 17, 2006 10:50 am Post subject: (No subject)
actually i think i know wat the problem is. your using an image box!!! delete the image box and change it to picture box. see the difference
Drewbie
Posted: Sat Jun 17, 2006 5:34 pm Post subject: (No subject)
I dont have the code on me. Its currently at school.
However, do you think the fact that I have 8 images moving across the screen would make a difference? Also, as the pictures become visible the game gets much slower. Could thins be from only using one timer?