1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Private Sub dgv_chat_scroll(sender As Object, e As ScrollEventArgs) Handles dgv_chat.Scroll
For i = 0 To dgv_chat.RowCount - 1
dgv_chat.Rows(i).Cells(0).Style.BackColor = Color.Black
dgv_chat.Rows(i).Cells(1).Style.BackColor = Color.Black
dgv_chat.Rows(i).Cells(2).Style.BackColor = Color.Black
dgv_chat.Rows(i).Cells(3).Style.BackColor = Color.Black
dgv_chat.Rows(i).Cells(4).Style.BackColor = Color.Black
dgv_chat.Rows(i).Cells(5).Style.BackColor = Color.Black
Next
For i = 0 To dgv_chat.RowCount - 1
If dgv_chat.Rows(i).Cells(2).Value = "" Then
dgv_chat.Rows(i).Cells(2).Style.BackColor = Color.Transparent
dgv_chat.Rows(i).Cells(4).Style.BackColor = Color.LightBlue
Else
dgv_chat.Rows(i).Cells(2).Style.BackColor = Color.FromArgb(147, 182, 216)
dgv_chat.Rows(i).Cells(4).Style.BackColor = Color.Transparent
End If
Next
End Sub |
Partager