# Visual Basic > Games and Graphics Programming > Game Demos >  picture box is shaking when moving on the X axis (VB 2010)

## grundy

hello everyone, i am making a zombie game in VB 2010 and i made it so the zombies picture box will come after my picture box. Everything works except when it moves left and right. It bounces/shakes when it moves and doesnt show the right sprite. it looks like when it moves left or right it actually moves up and down because it shows those sprites. i havent tried anything because i have no idea what i can do to fix it. 

dim enspeed as integer = 7

            If picboxenemy.Location.X > picbox1.Location.X Then
                picboxenemy.Location = New Point(picboxenemy.Location.X - enspeed, picboxenemy.Location.Y)
                Select Case newpositon
                    Case 0
                        Me.picboxenemy.Image = My.Resources.aleft1
                    Case 1
                        Me.picboxenemy.Image = My.Resources.aleft2
                    Case 2
                        Me.picboxenemy.Image = My.Resources.aleft3
                End Select
            ElseIf picboxenemy.Location.X < picbox1.Location.X Then
                picboxenemy.Location = New Point(picboxenemy.Location.X + enspeed, picboxenemy.Location.Y)
                Select Case newpositon
                    Case 0
                        Me.picboxenemy.Image = My.Resources.aright1
                    Case 1
                        Me.picboxenemy.Image = My.Resources.aright2
                    Case 2
                        Me.picboxenemy.Image = My.Resources.aright3
                End Select
            End If

            If picboxenemy.Location.Y > picbox1.Location.Y Then
                picboxenemy.Location = New Point(picboxenemy.Location.X, picboxenemy.Location.Y - enspeed)
                Select Case newpositon
                    Case 0
                        Me.picboxenemy.Image = My.Resources.aup1
                    Case 1
                        Me.picboxenemy.Image = My.Resources.aup2
                    Case 2
                        Me.picboxenemy.Image = My.Resources.aup3
                End Select
            Else
                picboxenemy.Location = New Point(picboxenemy.Location.X, picboxenemy.Location.Y + enspeed)
                Select Case newpositon
                    Case 0
                        Me.picboxenemy.Image = My.Resources.adown1
                    Case 1
                        Me.picboxenemy.Image = My.Resources.adown2
                    Case 2
                        Me.picboxenemy.Image = My.Resources.adown3
                End Select
            End If

----------


## Joacim Andersson

Thread closed. Duplicate thread can be found here: http://www.vbforums.com/showthread.p...ement-problems

----------

