-
I have a small application (actually its just a driver for some code i want to test), and it uses a MSFlexGrid to display my results. So i add many lines to the grid and then loop through and colour-code the cells depending on their content.
Anyway, my tip is that if you set the grid's .Visible property to false before you add or loop thru the grid colour-coding it, and then after you do this, set .Visible back to true, it is much much much quicker. In fact on my PII/350 here at work it seems almost instantaneous, compared to before when i could see each line being looped thru.
Hope this helps someone. Perhaps you all knew this already. I'm not sure if it works with other grids, though i can't see why it wouldnt have the same effect,
-
Or better yet, you can use LockWindowUpdate API to stop any drawings om this control. And then reenabling it again.