If up is pressed then copy the area behind the sprite from fr_bm Paste the section of fr_bm at the same position of wholeimg draw sprite on top
I am trying to cover up the annoying trail that my sprite leaves.
here is what i have(which I will admit is faily more messed up than it was an hour ago)
Public Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As Int32) As UShort Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick If GetAsyncKeyState(Convert.ToInt32(Keys.Down)) Then Dim z As Graphics = Graphics.FromImage(WholeImg) 'wholeimgand fr_bm are both bitmaps that hold an identical background Dim g As Graphics = Graphics.FromImage(fr_bm) Dim fr_rect As New Rectangle(x, y - 18, 22, 3) Dim to_rect As New Rectangle(x, y - 18, 22, 3) g.DrawImage(WholeImg, to_rect, fr_rect, _ GraphicsUnit.Pixel) g.DrawRectangle(Pens.Red, fr_rect)'this is just to show me where it put the chunk, this line will be deleted in the end y = y + 3 z.DrawImageUnscaled(character, x, y) End If Me.BackgroundImage = WholeImg Me.Refresh()
Thanks for the help. />/>
This post has been edited by xilith117: 22 January 2014 - 09:57 AM