American Football Scorer

OliverE

Power member.
Reputation
0
American Football Scorer

[attachment=186]​

Here is the code for a extremely simple American Football scorer.

Requirements
  • 6 Buttons
  • 4 Labels
  • 2 Textboxes

The code below has been created using my layout. To ensure the code works straight off, ensure that;
  1. Label 1, Buttons 1-3 and Textbox 1 are all for Team A.
  2. Label 2, Buttons 4-6 and Textbox 2 are all for Team B.

[vb]Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label1.Text = Label1.Text + 6
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Label1.Text = Label1.Text + 3
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Label1.Text = Label1.Text + Val(TextBox1.Text)
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Label2.Text = Label2.Text + 6
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Label2.Text = Label2.Text + 3
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Label2.Text = Label2.Text + Val(TextBox2.Text)
End Sub
End Class[/vb]
 
Back
Top