One of the causes of the slowness maybe because the PictureBox is a resource hog (relatively speaking) ... with so many pic's - memory gets chewed-up pretty quick. Just as a test - might comment out the first line and add two more (use labels instead):

code:
$lGrid = $lGrid + 1

;$nul=Execute("$$picGrid"+$lGrid+" = $$frmColor.PictureBox('',$lLeft,$lTop,20,20)")

$nul=Execute("$$picGrid"+$lGrid+" = $$frmColor.Label('',$lLeft,$lTop,20,20)")
$nul=Execute("$$picGrid"+$lGrid+".BorderStyle=2")