0% found this document useful (0 votes)
31 views2 pages

Grade Converter Codes

asdffaf

Uploaded by

Kenneth posion
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views2 pages

Grade Converter Codes

asdffaf

Uploaded by

Kenneth posion
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Public Class Form1

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click


TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox2.BackColor = Color.White
TextBox3.BackColor = Color.White
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click


If TextBox1.Text >= 99 And TextBox1.Text <= 100 Then
TextBox2.Text = "1.00"
TextBox3.Text = "Passed"
ElseIf TextBox1.Text >= 96 And TextBox1.Text <= 98 Then
TextBox2.Text = "1.25"
TextBox3.Text = "Passed"
ElseIf TextBox1.Text >= 93 And TextBox1.Text <= 95 Then
TextBox2.Text = "1.50"
TextBox3.Text = "Passed"
ElseIf TextBox1.Text >= 90 And TextBox1.Text <= 92 Then
TextBox2.Text = "1.75"
TextBox3.Text = "Passed"
ElseIf TextBox1.Text >= 87 And TextBox1.Text <= 89 Then
TextBox2.Text = "2.00"
TextBox3.Text = "Passed"
ElseIf TextBox1.Text >= 84 And TextBox1.Text <= 86 Then
TextBox2.Text = "2.25"
TextBox3.Text = "Passed"
ElseIf TextBox1.Text >= 81 And TextBox1.Text <= 83 Then
TextBox2.Text = "2.50"
TextBox3.Text = "Passed"
ElseIf TextBox1.Text >= 78 And TextBox1.Text <= 80 Then
TextBox2.Text = "2.75"
TextBox3.Text = "Passed"
ElseIf TextBox1.Text >= 75 And TextBox1.Text <= 77 Then
TextBox2.Text = "3.00"
TextBox3.Text = "Passed"
ElseIf TextBox1.Text >= 72 And TextBox1.Text <= 74 Then
TextBox2.Text = "4.00"
TextBox3.Text = "Failed"
TextBox2.BackColor = Color.Red
TextBox3.BackColor = Color.Red
TextBox2.ForeColor = Color.White
TextBox3.ForeColor = Color.White
ElseIf TextBox1.Text <= 71 And TextBox1.Text >= 0 Then
TextBox2.Text = "5.00"
TextBox3.Text = "Failed"
TextBox2.BackColor = Color.Red
TextBox3.BackColor = Color.Red
TextBox2.ForeColor = Color.White
TextBox3.ForeColor = Color.White
Else
MsgBox("Invalid Input, Not Recognized", MsgBoxStyle.RetryCancel Or
MsgBoxStyle.Exclamation, "Error Message")
End If
End Sub

Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles


TextBox1.TextChanged

End Sub

Private Sub Ctl_Enter(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyUp


If e.KeyCode = Keys.Enter Then
Button2.PerformClick()
Else
End If
End Sub

Private Sub Clt_Remove(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyUp


If e.KeyCode = Keys.Escape Then
Button1.PerformClick()
Else
End If
End Sub

Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles


TextBox2.TextChanged

End Sub
End Class

You might also like