I'm working on a code editor using Windows Forms and I'm stepping into the typical "flickering" problem. However, it seems that traditional solutions do not work for me.
My application uses a large amount of Krypton Suite components, including the KryptonForm, which is inherited by every form from my project.
Whenever I call ShowDialog() on a new form, it flickers before being properly displayed. Even if it happens for a few milliseconds only, it's annoying. The "flickering" doesn't seem to come from the controls inside the form, because I only see a portion of Windows 11's title bar before the form "fixes itself" to its correct design.
In the GIF below, I try to display the "Find&Replace" form. You can see the attempt to display the Windows 11 title bar over Krypton's Form design:
The code that displays the second panel is this:
FindReplaceFormInput input = new FindReplaceFormInput();
input.Palette = KryptonCustomPaletteBase;
findReplaceForm.ShowDialog();
I am also sending a KryptonPalette, as in the FindReplaceForm's Load event, certain components will get their design from that global Palette:
private void FindReplaceForm_Load(object sender, EventArgs e)
{
kryptonPanel1.Palette = Input.Palette;
kryptonTextBox1.Palette = Input.Palette;
// and so on...
this.BringToFront();
findTextBox.SelectAll();
}
Removing the content of Load() seems to show the classic Krypton design, but still with a small glimpse of the Win11 title bar before resolving itself.
I've also tried every other solution from Stack Overflow (and not only), including:
- Set Form's
DoubleBufferedProperty to true - Set
DoubleBufferedthrough theSetStylemethod - Suspend the layout before showing the form or call
Invalidate()and thenUpdate() - Override
WndProc
Is this a Krypton-related "bug"? Or is still Winforms-side?

AnimateWindowmethod this way to fade-in the form. The flickering part will be rendered in a low-opacity frames. Also, try another thing before that, remove theDoubleBufferedstyle.OnLoadmethod is called, or in that context). Proceeding like this, there is way less stuff to consider and way less code to test in different scenarios, since the Desktop Window Manager and the .NET code have already done their part. Of course you have some drawbacks...