The following example sets the ForeColorFixed and the ForeColorSel properties of the MSHFlexGrid to change to a random color each second.
Note If you are using the MSFlexGrid, substitute "MSHFlexGrid1" with "MSFlexGrid1."
Private Sub Form_Load ()
Timer1.Interval = 500
MSHFlexGrid1.FillStyle = 2
MSHFlexGrid1.Text = "Color Me"
MSHFlexGrid1.FixedCols = 1
MSHFlexGrid1.FixedRows = 1
End Sub
Private Sub Timer1_Timer ()
MSHFlexGrid1.ForeColorFixed = QBColor(Rnd * 15)
MSHFlexGrid1.ForeColorSel = QBColor(Rnd * 10)
End Sub