Hi,
>>
Thank you for the reply. Are you using Refresh() or Invalidate() in your code?
I did a little more reading about Invalidate() and it appears that the control will not be redrawn until there is an open time-slice to redraw (unless you issue Update() immediately following the Invalidate()).
It appears that both methods work for my control.
>>
I think you're right. I believe the .NET .Invalidate() generates a WM_PAINT and, since this is a low priority message, the actual redraw won't normally occur until there's some processing time available. Presumably .Update() directly calls the Paint method (effectively 'jumping the queue'). From the help on .Refresh:
"Forces the control to invalidate its client area and immediately redraw itself and any child controls." The 'immediately' seems to imply that .Refresh is the same as issuing:
.Invalidate(True)
.Update()
All just supposition on my part though.
In practice I only use .Invalidate() when I'm doing low level graphics stuff and overriding Paint() but I'd be hard put to it to justify the choice on logical grounds...
Regards,
Viv