Reputation: 90
I'm trying to create a title screen for a C# Game i'm making. I created a video to use as the background for the title screen, and extracted the frames to JPEG files. Using this:
int frame = 1;
private void timer1_Tick(object sender, EventArgs e)
{
if (frame == 901) { frame = 1; }
this.BackgroundImage = Image.FromFile("src\\titlescreen\\0 (" + frame + ").jpg");
frame++;
}
The form flickers when changing the image. The timer is on a 1 tick delay.
Is there any way to stop this?
Additional info: The form is maximised.
Thanks in advance,
DMP9
Upvotes: 0
Views: 72
Reputation: 7447
To solve this problem you have to enable double buffering. It is just a simple attribute you should be fine with it.
Upvotes: 2