
-----------------------------------
Drewbie
Fri Jun 16, 2006 9:17 pm

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]

-----------------------------------
NikG
Fri Jun 16, 2006 11:01 pm


-----------------------------------
Add a timer control and use that to trigger the movement.

-----------------------------------
Drewbie
Sat Jun 17, 2006 10:29 am


-----------------------------------
this is pretty much the code i have for moving the objects

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
Sat Jun 17, 2006 10:48 am


-----------------------------------
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:


Picture1.Move Picture1.Left - 10

-----------------------------------
cool dude
Sat Jun 17, 2006 10:50 am


-----------------------------------
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
Sat Jun 17, 2006 5:34 pm


-----------------------------------
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?

If i cant figure it out ill post the program up

Thanks
