| | |
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 |
Tag cloud for VB.NET
.net 2005 2008 access account application arithmetic array arrays basic bing button buttons c# center check checkbox code combobox component convert crystalreport data database datagrid datagridview date design dissertation dissertations dropdownlist excel fade file-dialog ftp generatetags google gridview hardcopy images inline input insert intel internet listview mobile monitor ms net networking objects output passingparameters picturebox picturebox1 plugin port print printing problem problemwithinstallation project remove save searchbox searchvb.net select serial server shutdown soap sorting survey table tcp temperature text textbox timer toolbox trim update updown user validation vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf





