Activating or deactivating doFlip doesn't change much. There's still no flickering. The only way I get a flicker is when I add DXDraw1.flip to the onTimer event.

But why use DXDraw1.Primary.StretchDraw and not DXDraw1.Surface.StretchDraw?