Hey,
I am trying to animate a picturebox with code something like this
But it says imageAnimator.Animate expression does not produce a value.
I cant seem to find an example anywhere. Is there a right way to do it or an alternative?
I have a png of 256 wide and 80 high. each player frame is 32 wide and there are 8 different stages of movement. I want to draw the first 0-32 in a picturebox then the 32-64 and so on.
I have no idea what to do. Please help me
I am trying to animate a picturebox with code something like this
Code:
Private Sub Timer2_Tick(sender As System.Object, e As System.EventArgs) Handles Timer2.Tick
player.Image = ImageAnimator.Animate(My.Resources.Playerwalk, New EventHandler(AddressOf Me.OnFrameChanged))
End Sub
Private Sub OnFrameChanged(ByVal o As Object, ByVal e As EventArgs)
'Force a call to the Paint event handler.
Me.Invalidate()
End SubI cant seem to find an example anywhere. Is there a right way to do it or an alternative?
I have a png of 256 wide and 80 high. each player frame is 32 wide and there are 8 different stages of movement. I want to draw the first 0-32 in a picturebox then the 32-64 and so on.
I have no idea what to do. Please help me