[Course]VB Day 8

Posts 1–6 of 6 · Page 1 of 1
[Course]VB Day 8
Code:
 
Public Class Form1
Dim ANSWER As Integer



Private Sub BTNcheck_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNcheck.Click
Dim yourANS As Integer = Val(Me.TXTanswers.Text)
If yourANS = ANSWER Then
Me.LBLcorrect.Text = "correct!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
Else
Me.LBLcorrect.Text = "Wrong!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
End If
End Sub
Private Sub BTNprob_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNprob.Click
Dim numPick As New Random
Dim num1 As Integer
Dim num2 As Integer
Dim problem As String

num1 = numPick.Next(1, 11)
num2 = numPick.Next(1, 11)
If Me.RADadd.Checked Then
problem = num1.ToString & " + " & num2.ToString
Me.lblProblems.Text = problem
ANSWER = num1 + num2
ElseIf Me.RADmulti.Checked Then
problem = num1.ToString & " * " & num2.ToString
Me.lblProblems.Text = problem
ANSWER = num1 * num2
Else
problem = num1.ToString & " - " & num2.ToString
Me.lblProblems.Text = problem
ANSWER = num1 - num2
End If

End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
take a vb class school
fukken borning shit for now..

make forum that
  • adds
  • subtracts
  • and multiply

and sees if you are doing it right..

*SIGH*
well i guess u helped a lot of ppl
Simple but thanks for sharing.
Calculators isnt that hard to make but still this will help some newbs.
this is completely useless, bored in school...
this what we made in class
so, i posed it...
>_>
i will post crap later on
that will be doin
Since when were you SP and not GM gourav?
Since i went MIA when i was hunting foh loli's
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us