biosupgrade
Nov 12th, 1999, 01:52 AM
Hi, I started making a program in VB 5 in which I make an image of a car move around the form, when I turn it left or right it goes in that direction, but the only thing is that the image of the car doesn't change the same way and it looks silly. Can someone please HELP!!!
Yonatan
Nov 12th, 1999, 02:13 AM
Maybe not the best solution there is:
Option Explicit
Private Sub FlipPicture(objPic As PictureBox)
Dim FlippedPic As StdPicture, bAutoRedraw As Boolean
With objPic
bAutoRedraw = .AutoRedraw
.AutoRedraw = True
Set FlippedPic = .Image
Set .Picture = Nothing
Call .PaintPicture(FlippedPic, 0, 0, .Width, .Height, .Width, 0, -.Width, .Height)
Set .Picture = .Image
.AutoRedraw = bAutoRedraw
End With
End Sub
' Sample Usage:
Private Sub Command1_Click()
Call FlipPicture(Picture1)
End Sub
------------------
Yonatan
Teenage Programmer
E-Mail: RZvika@netvision.net.il
ICQ: 19552879 (http://www.icq.com/19552879)