Hello everyone,
I am writing codes for a pay calculator. The program works fine, except I need the text to turn green with certain results. Here is the codes for my program:
I need the calculation results to turn green whenever the user enters value greater than 40 for any of the even number slots (Num2, Num4, Num6, Num8, Num10, and Num12). I have tried to figure this out and have not been successful. I appreciate any help.
I am writing codes for a pay calculator. The program works fine, except I need the text to turn green with certain results. Here is the codes for my program:
Code:
Public Class Je_P1
Dim Num1 As Integer
Dim Num2 As Integer
Dim Num3 As Integer
Dim Num4 As Integer
Dim Num5 As Integer
Dim Num6 As Integer
Dim Num7 As Integer
Dim Num8 As Integer
Dim Num9 As Integer
Dim Num10 As Integer
Dim Num11 As Integer
Dim Num12 As Integer
Dim Pay As Integer
Private Sub ButtonExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonExit.Click
Close()
End Sub
Private Sub ButtonCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCalc.Click
Num1 = CInt(TextBoxNum1.Text)
Num2 = CInt(TextBoxNum2.Text)
Num3 = CInt(TextBoxNum3.Text)
Num4 = CInt(TextBoxNum4.Text)
Num5 = CInt(TextBoxNum5.Text)
Num6 = CInt(TextBoxNum6.Text)
Num7 = CInt(TextBoxNum7.Text)
Num8 = CInt(TextBoxNum8.Text)
Num9 = CInt(TextBoxNum9.Text)
Num10 = CInt(TextBoxNum10.Text)
Num11 = CInt(TextBoxNum11.Text)
Num12 = CInt(TextBoxNum12.Text)
LabelPay1.Text = CStr(Num1 * Num2)
LabelPay2.Text = CStr(Num3 * Num4)
LabelPay3.Text = CStr(Num5 * Num6)
LabelPay4.Text = CStr(Num7 * Num8)
LabelPay5.Text = CStr(Num9 * Num10)
LabelPay6.Text = CStr(Num11 * Num12)
End Sub
Private Sub John_Everett_P1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class