| | |
find the error please...
Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Oct 2007
Posts: 8
Reputation:
Solved Threads: 0
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!!!
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
- i neeed ur help .. find error in data structure program (C++)
- program error for cd burner program (Windows NT / 2000 / XP)
- runtime error#58 (Visual Basic 4 / 5 / 6)
- Can't find the error (C)
- help me find the error (C++)
- find out the error in my code (Java)
- Lotus notes error: #0c:04 (Networking Hardware Configuration)
- Bridge.dll error (Viruses, Spyware and other Nasties)
- iexplorer.exe send error reports(1 too many) (Web Browsers)
Other Threads in the VB.NET Forum
- Previous Thread: Need a Sample Project on MDI
- Next Thread: OleDbCommandBuilder isn't working
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2005 2008 access arithmetic array assignment basic binary bing box button buttons center check code combobox component connectionstring convert crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net dropdownlist editvb.net excel file-dialog firewall folder ftp google hardcopy image images isnumericfuntioncall listview login math memory mobile ms mssqlbackend mysql navigate net networking opacity output peertopeervideostreaming picturebox picturebox1 port print printpreview problemwithinstallation project record reports" save savedialog searchbox serial soap sorting string tcp temp text textbox timer toolbox trim updown upload useraccounts usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view visual visualbasic visualbasic.net visualstudio web wpf





