I have developed a windows application whose interface has a multiple text boxes and all of them are placed in one panel (the panel have a background image).
Whenever the panel is being loaded, the window(with these textboxes) is flickering.
I read a lot of suggestions to minimize this flickering, One of the suggested solutions was the following,
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
But it does not work with me,
I read about turning off the WS_CLIPCHILDREN using this code:
protected override CreateParams CreateParams {
get {
var parms = base.CreateParams;
parms.Style &= ~0x02000000; // Turn off WS_CLIPCHILDREN
return parms;
}
}
This code help some people who faced the same problem. So I want to use it but I really don't know where to paste it, I mean, I read that it should be pasted not in the form, but in the the UserControl's code. I don't know how to do that, all the controls that i used is not a custom controls.
Take a look here & see the 1st answer:
How to fix the flickering in User controls
Thanks in advance,