-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrmDisplayResults.vb
More file actions
24 lines (21 loc) · 1.04 KB
/
Copy pathFrmDisplayResults.vb
File metadata and controls
24 lines (21 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Public Class FrmDisplayResults
Private Sub FrmDisplayResults_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim X As Integer
For X = 0 To RtfResults.Lines.Count - 1
RtfResults.SelectionStart = RtfResults.GetFirstCharIndexFromLine(X)
RtfResults.SelectionLength = RtfResults.Lines(X).Length
If InStr(RtfResults.Lines(X), "(CORRECT)") Then
RtfResults.SelectionColor = Color.Green
ElseIf InStr(RtfResults.Lines(X), "(INCORRECT)") Then
RtfResults.SelectionColor = Color.Red
ElseIf InStr(RtfResults.Lines(X), "Total Questions:") Or
InStr(RtfResults.Lines(X), "Correct Answers:") Or
InStr(RtfResults.Lines(X), "Incorrect Answers:") Or
InStr(RtfResults.Lines(X), "Percent Correct:") Then
RtfResults.SelectionColor = Color.Blue
Else
RtfResults.SelectionColor = Color.Black
End If
Next
End Sub
End Class