You're not keeping track of the position.

You're declaring Xx and Yy each time you hit this code so Xx will be 0 and Yy will be 0.

You then add up to +-7 to that so your picturebox will always be within 7 pixels of 0,0.

If you declare Xx and Yy in the declarations area of the form, then they will be created once and hold their values (they can now accumlate the position over time) and be accessible to all routines in the form.

Also, since accell is presumed to be a Single {

**Edit: I now see you said it was a double**} (so it can hold values like .25), the variables Xx and Yy should also be Singles so they can accumulate fractional amounts.

Otherwise, if you repeatedly add small values (less than .5) to an Integer, the Integer value will not change since it can only change in "whole" numbers.

Also, if Rotation is in degrees, dividing degrees into PI won't convert it to radians.

The value PI is the circumference of the circle measured in diameters lengths of the circle (there are 3.1415926…. diameter lengths around the circle).

The radius is ½ of the diameter, so there are twice as many radius lengths around the circle (i.e. two Pi radians).

You need to convert degrees into radians. So, the one scale (radians) is 0 to 2*Pi and the other scale (degrees) is 0 to 360.

To convert degrees to radians you multiple the degrees by (target scale)/(source scale), that is, degrees * (2*Pi/360), (which is equivalent to degrees * Pi/180).

Likewise, if you have radians and wanted to convert to degrees then you “flip” the scales (radians * 180/Pi).

It is common to declare a constant for these conversion values.

Code:

'In the declarations area at the top of the form code (below the Class statement)
Const DEG2RAD = Math.PI / 180.0
Const RAD2DEG = 180.0 / Math.PI
Dim Xx, Yy as Single 'hold the location of our moving object
'in the code where your movement is being done
Xx += Math.Sin(Rotation * DEG2RAD) * accell
Yy -= Math.Cos(Rotation * DEG2RAD) * accell
PictureBox1.Location = New Point(Xx, Yy)

Here's a quick example base on your input. Normally you wouldn't move a picturebox around, you would move where you draw your object(s), but since you're currently geared for that, this moves a picturebox.

It draw a single line in the picturebox so you know which direction the box will head when you press the "Up" arrow key (up arrow changes accell value).

To turn left or right, you use the left and right arrow keys.

Just start a new project, and add a picturebox and a timer control to the form and paste this code in. Just a very simple example.

Code:

Public Class Form1
Dim Xx, Yy As Single
Dim Rotation As Single = 135.0
Dim accell As Single
Const DEG2RAD = Math.PI / 180.0
Const RAD2DEG = 180.0 / Math.PI
Dim TurnLeft, TurnRight, Accelerate, Decelerate As Boolean
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
Select Case e.KeyCode
Case Keys.Right : TurnRight = True
Case Keys.Left : TurnLeft = True
Case Keys.Up : Accelerate = True
Case Keys.Down : Decelerate = True
End Select
End Sub
Private Sub Form1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
Select Case e.KeyCode
Case Keys.Right : TurnRight = False
Case Keys.Left : TurnLeft = False
Case Keys.Up : Accelerate = False
Case Keys.Down : Decelerate = False
End Select
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
PictureBox1.BorderStyle = BorderStyle.Fixed3D
Timer1.Interval = 15
Timer1.Start()
End Sub
Private Sub MoveObj()
Xx += Math.Sin(Rotation * DEG2RAD) * accell
Yy -= Math.Cos(Rotation * DEG2RAD) * accell
PictureBox1.Location = New Point(Xx, Yy)
PictureBox1.Invalidate() 'to redraw the direction line
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If TurnRight Then
Rotation += 5
If Rotation >= 360 Then
Rotation -= 360
End If
End If
If TurnLeft Then
Rotation -= 5
If Rotation < 0 Then
Rotation += 360
End If
End If
If Accelerate Then
If accell < 7 Then
accell += 0.25
End If
Else
If accell > 0 Then
accell -= 0.25
If accell < 0.2 Then
accell = 0
End If
End If
End If
If Decelerate Then
If accell > -7 Then
accell -= 0.25
End If
Else
If accell < 0 Then
accell += 0.25
If accell > -0.2 Then
accell = 0
End If
End If
End If
MoveObj()
End Sub
Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
With PictureBox1
e.Graphics.Clear(.BackColor)
e.Graphics.TranslateTransform(.ClientSize.Width / 2, .ClientSize.Height / 2)
e.Graphics.RotateTransform(Rotation)
e.Graphics.FillRectangle(Brushes.Brown, -8, -8, 4, 16)
e.Graphics.FillRectangle(Brushes.Brown, 4, -8, 4, 16)
e.Graphics.FillEllipse(Brushes.Blue, -6, -6, 12, 12)
e.Graphics.DrawLine(Pens.Black, 0, 0, 0, -25)
End With
End Sub
End Class

**Edit: ** Added a couple of rectangles to the example do make the drawing a little more interesting. Now it sort of looks "tank" like with "treads" on the sides of the circle.