0

Why setting a Form background (in the structure, before form loading), flickers when it is shown?

BackgroundImage = Properties.Resources.ProgramLaunchIntroScreen1200x800;
BackgroundImageLayout = ImageLayout.Stretch;

When the application starts, first, at a very short time, the Form is seen without any background image then it is drawn on the screen! (I use the double buffer but still unsolved)

1 Answers1

0

I found a solution from here. Anyone can explain what this override exactly does?

protected override CreateParams CreateParams
{
      get
      {
          CreateParams createParams = base.CreateParams;

          createParams.ExStyle |= 0x02000000;

          return createParams;
      }
}
  • [To reduce flicker by double buffer: SetStyle vs. overriding CreateParam](https://stackoverflow.com/questions/25872849/to-reduce-flicker-by-double-buffer-setstyle-vs-overriding-createparam) – dr.null Feb 16 '21 at 17:07