2008-04-03 09:07:22,,飛ㄦ*

計算成績

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim A, B, C, D As Single
A = TextBox1.Text * 2
B = TextBox2.Text * 3
C = TextBox3.Text * 2
D = (A + B + C) / 7
If D >= 60 Then
Label5.ForeColor = Color.Blue
Else
Label5.ForeColor = Color.Red
End If
Label5.Text = D
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
End Sub

上一篇:登入系統

下一篇:新增項目練習