I'm a second year student, and our Faculty uses C# and the Windows Form environment to illustrate and demonstrate Programming Principles. However i teach myself c++ as far as i learn new C# code(Here it's good to know both).
I'm curious about something : thus far i have never had a problem with the time forms take to be contructed and drawn, but since i used a simple 1280x1024(4:3) image as the backround image of one of my forms, i'm very disapointed. Now to avoid the flickering of controls when the form first apears i did the following :
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000; // Turn on WS_EX_COMPOSITED
return cp;
}
}
Link : How to fix the flickering in User controls
This solved the previous mention problem, however, now i have to wait up till 1.5 seconds(depending on the speed of the PC i'm running the exe on) before anything shows.
Does the fault lie in the way c# compiles, the WinForms environment, or is there some solution i just haven't tried.