i have a code of a projectile but...
can these code be shorten or not???
i need new version of this and some times if i played this one some error was done
hope you could help me to fing the error


Option Explicit
Dim Angle, Theta, y, x, t, Vo As Single
Const pi = 3.141592654

Private Sub cmdClear_Click()
txtSpeed.Text = ""
txtAngle.Text = ""
End Sub

Private Sub cmdGo_Click()
giatayngatimer.Enabled = True
Vo = Val(txtSpeed.Text)
Theta = pi * Val(txtAngle.Text) / 180
t = 0

End Sub

Private Sub cmdStop_Click()
giatayngatimer.Enabled = False
End Sub

Private Sub Form_Load()
giatayngatimer.Enabled = False
Scale (-45, 1000)-(1000, -1000)
Line (1000, -45)-(-1000, 1000), , BF
End Sub

Private Sub giatayngatimer_Timer()
y = Vo * Sin(Theta) * t - (4.9) * (t ^ 2)
x = Vo * Cos(Theta) * t
t = t + 1
shapeCircle.Top = Fix(y)
shapeCircle.Left = Fix(x)
End Sub

thanx a lot!!! god bless you!!!! and more powers!!!

u mean,it has to b written in vb.net or entire procedure to be reduced!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.