That can cause this problem, esp if your video card is too fast.
------------------
------------------
I'm using DX with double buffering and calling Flip(). Any way to fix this?
lpdd->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN,0);
...in your code, befor you flip your page?