Programmin GUI 2

Topic Progress


You need:

  • 5 labels
  • 3 NumericUpDown
  • 1 button

Click on the button and add the following code

1
2
3
4
5
6
7
8
9
10
11
12
 Dim total As Decimal
 Dim small As Decimal
 Dim medium As Decimal
 Dim large As Decimal

 small = NumericUpDown1.Value * 2.0
 medium = NumericUpDown2.Value * 4.0
 large = NumericUpDown3.Value * 6.0

 total = small + medium + large

Label5.Text = total

Code Challenge

Add an extra option for XX Large pizza at £8.00 and change the code