From Xojo Documentation
Similar to Refresh, but causes the control to be marked dirty and to be redrawn when the window contents need to be redrawn.
Similar to RefreshRect, but causes the specified region of the RectControl to be marked dirty and to be redrawn when the window contents need to be redrawn. The region to be redrawn is specified by the X, Y, Width, and Height parameters. This form of Invalidate was formerly called InvalidateRect.
To redraw a control immediately, call Refresh or Refreshrect. For example, this would be appropriate from a tight loop, if you need the screen to be updated but there is no chance for your application's main event loop to execute in the meantime.
Otherwise, it is generally more efficient to call Invalidate, which tells the operating system that the control (or part of it) needs to be redrawn. The advantage of this approach is that more than one part of the screen might be invalidated before the next general screen refresh, and the operating system can wait until that refresh to repaint all invalid regions of the screen at once.
The following example refreshes the control. EraseBackground defaults to True.