Author Topic: Visual Basic Anyone?  (Read 5369 times)

DoctorHarte

  • Mighty Duke
  • ****
  • Posts: 593
  • Stoned on BattleMaster
    • View Profile
Visual Basic Anyone?
« Topic Start: March 23, 2011, 03:59:52 AM »
I know there are quite a few programmers who play BM (obviously) and was wondering if any of you would help me?
 
Code: [Select]
Public Class Form1

     Private Sub BtnCompute_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnCompute.Click
        Dim velocity As Double
        Dim sec1 As Double
        Dim sec2 As Double
        Dim sec3 As Double

        sec1 = (-16 * 1) + (velocity * 1) + 5
        sec2 = (-16 * 4) + (velocity * 2) + 10
        sec3 = (-16 * 9) + (velocity * 3) + 15
    End Sub

    Private Sub sec1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sec1.TextChanged
        sec1.Text = "  "

    End Sub

    Private Sub sec2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sec2.TextChanged
        sec2.Text = "  "
    End Sub

    Private Sub sec3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sec3.TextChanged
        sec3.Text = "  "
    End Sub

End Class

The text boxes must appear to be blank at the start. The thing I cannot fathom how to do although it's probably most easy, is how to code the program to display the results of the formula in the text box after the button has been clicked.

I'm having a real hard time right now and have been researching how to do this for hours!
New Harte Family: Eros (Vix Tiramora, EC), Nyx (Fronen, BT), Chance (Avernus, DW), Scopuli (Gothica, Colonies)

Old Harte Family: Hyperion (Aurvandil, DW), William (IVF, BT), Katrina (Fronen, BT), Callandor II (Ohnar West, FE)