Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Moving pictures in VB
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Drewbie




PostPosted: 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
Sponsor
sponsor
NikG




PostPosted: Fri Jun 16, 2006 11:01 pm   Post subject: (No subject)

Add a timer control and use that to trigger the movement.
Drewbie




PostPosted: 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




PostPosted: 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




PostPosted: 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 Smile
Drewbie




PostPosted: 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?

If i cant figure it out ill post the program up

Thanks
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: