I've had this problem for a while now, and this is the second post about it. I have a problem with dissapearing sprites.
If you have some time, please check out this project and tell me why the sprite appears to randomly dissapear. Only look at this is you have > WIN98.
What happens is that when the car(the sprite) is loaded, it may or may not dissapear. this happens when the game is loaded, or when the car changes direction and a new sprite is loaded. I would be greatful of any help you could give me.
thanks
I've had a quick look and the problem is in the clsSprite.cls file. You have a public sub called Draw, in this the first thing you do is to check the validity of the hdc of the sprite. Your code was checking if the hdc value was less than 1, but sometimes a hdc can be a negative number. Change the code to read...
Code:
'make sure current frame is valid
If cbFrames(lCurrentFrame).hdc = 0 Then Exit Sub