Author Topic: Visual Basic Anyone?  (Read 5306 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)

De-Legro

  • Honourable King
  • *****
  • Posts: 3838
    • View Profile
Re: Visual Basic Anyone?
« Reply #1: March 23, 2011, 04:07:22 AM »
First problem, using visual basic. That said do you have the event handler for the button set up so that the calculation is performed when you click the button?
Previously of the De-Legro Family
Now of representation unknown.

DoctorHarte

  • Mighty Duke
  • ****
  • Posts: 593
  • Stoned on BattleMaster
    • View Profile
Re: Visual Basic Anyone?
« Reply #2: March 23, 2011, 07:44:24 AM »
It's all good, I figured it out. Had to set the Text Property to this and that. I was told too late that I should have done C++ instead of VB
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)

De-Legro

  • Honourable King
  • *****
  • Posts: 3838
    • View Profile
Re: Visual Basic Anyone?
« Reply #3: March 23, 2011, 10:19:09 AM »
VB is great for doing simple things with forms though. C++ needs a little more work when doing GUI stuff, depending on what GUI framework you choose.
Previously of the De-Legro Family
Now of representation unknown.

^ban^

  • BM Dev Team
  • Mighty Duke
  • *
  • Posts: 1056
  • Le Genie
    • View Profile
Re: Visual Basic Anyone?
« Reply #4: April 01, 2011, 10:24:00 AM »
VB is great for doing simple things with forms though.


Or you could just use Java and avoid the abomination that is VB.
Born in Day they knew the Light; Rulers, prophets, servants, and warriors.
Life in Night that they walk; Gods, heretics, thieves, and murderers.
The Stefanovics live.

DoctorHarte

  • Mighty Duke
  • ****
  • Posts: 593
  • Stoned on BattleMaster
    • View Profile
Re: Visual Basic Anyone?
« Reply #5: April 01, 2011, 11:13:37 AM »

Or you could just use Java and avoid the abomination that is VB.

I wish I could, but it's a class I am required to go through.. for some odd reason. Plus I can use it as a math credit  8)
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)

Madmonk77

  • Knight
  • **
  • Posts: 80
  • tiki tiki on the rocks!
    • View Profile
    • Rock-Soft
Re: Visual Basic Anyone?
« Reply #6: April 12, 2011, 05:15:15 PM »

Or you could just use Java and avoid the abomination that is VB.

Ha, another java mate!
Nico.-

"What else can happen when an unstoppable force collides with an immovable object?" -- Used to be the player of Vats family. Now I'm the player of Vlad family.

Foundation

  • Honourable King
  • *****
  • Posts: 2526
  • Okay... you got me
    • View Profile
    • White Halmos
Re: Visual Basic Anyone?
« Reply #7: April 13, 2011, 01:41:31 PM »
Python here. 8)

Also C++/Java/PHP.
The above is accurate 25% of the time, truthful 50% of the time, and facetious 100% of the time.

De-Legro

  • Honourable King
  • *****
  • Posts: 3838
    • View Profile
Re: Visual Basic Anyone?
« Reply #8: April 13, 2011, 01:44:11 PM »
hehe

I've used lots of different languages in my time, but I find the one most people have never heard of would be Fortran.
Previously of the De-Legro Family
Now of representation unknown.

Darksun

  • Noble Lord
  • ***
  • Posts: 205
    • View Profile
    • Bucksplace
Re: Visual Basic Anyone?
« Reply #9: April 13, 2011, 03:44:41 PM »
hehe

I've used lots of different languages in my time, but I find the one most people have never heard of would be Fortran.

There is still a mind-boggling amount of FORTRAN and COBOL in the world. All those new college grads and their fancy object oriented languages are usually astounded by this discovery. Financial services companies are the worst.

De-Legro

  • Honourable King
  • *****
  • Posts: 3838
    • View Profile
Re: Visual Basic Anyone?
« Reply #10: April 14, 2011, 01:22:15 AM »
Fortran is still one of the systems to bench mark Super Computers. For complex calculations I still haven't seen a language that approaches Fortran. I guess the reason most people I talk to are unaware of it is because its not really used as a general purpose language. You are hardly going to see some little windows GUI application written in Fortran.
Previously of the De-Legro Family
Now of representation unknown.

jaune

  • Mighty Duke
  • ****
  • Posts: 725
  • Suck my socks!
    • View Profile
Re: Visual Basic Anyone?
« Reply #11: April 14, 2011, 10:19:10 AM »
GW-Basic ftw!

Then it was ruined and quick basic came and line numbers were not needed anymore  :'(
~Violence is always an option!~

Richard Leonecoeur

  • Knight
  • **
  • Posts: 71
    • View Profile
Re: Visual Basic Anyone?
« Reply #12: April 26, 2011, 04:10:17 PM »
I use Java primarily, myself. It's a nice language, but it has some problems still and I personally think it's about due for a big update which could hopefully make it a bit more efficient.

I want to learn C sharp next, but I've also been looking in to UnityScript.