Skip to content

Instantly share code, notes, and snippets.

@joekaslow
Created June 12, 2018 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joekaslow/a52343d857b541316c7c055ffb1929b2 to your computer and use it in GitHub Desktop.
Save joekaslow/a52343d857b541316c7c055ffb1929b2 to your computer and use it in GitHub Desktop.
simple shopping cart in vb
Public Class Form1
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Const LX As Integer = 100
Const BN As Integer = 500
Const SD As Integer = 200
Const HD As Integer = 80
Const HM As Integer = 300
Const AM As Integer = 160
Dim sum As Integer
If CheckBox1.Checked = True Then
sum += LX
End If
If CheckBox2.Checked = True Then
sum += BN
End If
If CheckBox3.Checked = True Then
sum += SD
End If
If CheckBox4.Checked = True Then
sum += HD
End If
If CheckBox5.Checked = True Then
sum += HM
End If
If CheckBox6.Checked = True Then
sum += AM
End If
TextBox1.Text = sum.ToString("c")
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
End Sub
End Class
@joekaslow
Copy link
Author

I used Microsoft visual basic 2010 express to write the code.
And it was part of my assignment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment