If you're using the canvas functions for your game (and I assume you do), draw the cursor on the canvas instead of moving components around and use double-buffering to avoid the flicker.Originally Posted by peterbone
To draw an image with transparent areas onto a canvas do this:
[pascal]
Image1.Picture.Bitmap.Transparent := True;
Image1.Picture.Bitmap.TransparentColor := clRed;
Form1.Canvas.Draw(CursorX, CursorY, Image1.Picture.Bitmap);
[/pascal]
and if you draw on an off-screen buffer (e.g. another TBitmap) first and then Blt that onto the form canvas it shouldn't flicker anymore.
Bookmarks