If CDbl(totalAverage) >= 89 Then
lblGrade.Text = "A"
ElseIf CDbl(totalAverage) >= 79 Then
lblGrade.Text = "B"
ElseIf CDbl(totalAverage) >= 69 Then
lblGrade.Text = "C"
ElseIf CDbl(totalAverage) >= 59 Then
lblGrade.Text = "D"
ElseIf CDbl(totalAverage) >= 0 Then
lblGrade.Text = "F"
End If
只是尝试将文本的颜色更改为A,B或C的绿色.D为橙色,F为红色。
我以为它是lblGrade.Text.Color或类似的东西;然而,这似乎不是一个命令,我一直在四处寻找并且无法找到答案,并认为在这里问问会更容易。谢谢你的帮助
答案 0 :(得分:2)
lblGrade.Forecolor是你要找的东西。
对于橙色,它将是“lblGrade.ForeColor = Color.Orange”