943,778 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Marked Solved
  • Views: 684
  • VB.NET RSS
Oct 3rd, 2007
0

find the error please...

Expand Post »
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!!!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
WhitePunk is offline Offline
11 posts
since Oct 2007
Oct 12th, 2007
0

Re: find the error please...

u mean,it has to b written in vb.net or entire procedure to be reduced!!!
Reputation Points: 5
Solved Threads: 1
Junior Poster in Training
preetham.saroja is offline Offline
82 posts
since Jun 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Need a Sample Project on MDI
Next Thread in VB.NET Forum Timeline: OleDbCommandBuilder isn't working





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC