ForeColor, ForeColorFixed, ForeColorSel Properties (ModHFGrid) Example

The following example sets the ForeColorFixed and the ForeColorSel properties of the ModHFGrid to change to a random color each second.

Private Sub Form_Load ()
   Timer1.Interval = 500
   ModHFGrid1.FillStyle = 2
   ModHFGrid1.Text = "Color Me"
   ModHFGrid1.FixedCols = 1
   ModHFGrid1.FixedRows = 1
End Sub

Private Sub Timer1_Timer ()
   ModHFGrid1.ForeColorFixed = QBColor(Rnd * 15)
   ModHFGrid1.ForeColorSel = QBColor(Rnd * 10)
End Sub