Private Sub Button1_Click(Sender As Object, e As EventArgs) Handles Button1.Click
Me.Hide()
Form5.Show()
Dim intNum1 As Decimal
Dim intNum2 As Decimal
Dim intNum3 As Decimal
Dim intNum4 As Decimal
Dim intNum5 As Decimal
Dim intNum6 As Decimal
Dim intNum7 As Decimal
Dim intNum8 As Decimal
Dim intNum9 As Decimal
intNum1 = Decimal.Parse(TextBox1.Text)
intNum2 = Decimal.Parse(TextBox2.Text)
intNum3 = Decimal.Parse(TextBox3.Text)
intNum4 = Decimal.Parse(TextBox4.Text)
intNum5 = Decimal.Parse(TextBox5.Text)
intNum6 = Decimal.Parse(TextBox6.Text)
intNum7 = Decimal.Parse(TextBox7.Text)
intNum8 = Decimal.Parse(TextBox8.Text)
intNum9 = Decimal.Parse(TextBox9.Text)
Form5.Label1.Text = intNum1 + intNum2 + intNum3 + intNum4 + intNum5 + intNum6 + intNum7 + intNum8 + intNum9
答案 0 :(得分:0)
你应该使用
intNum1 = Val(TextBox1.Text)
而不是
intNum1 = Decimal.Parse(TextBox1.Text)