Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have an application on C# 3.5 desktop application with SQL 2005 as back end. There is a problem after I log in to the application, when I pull different forms specially child from, the form would blink like a tube light before it appears on the screen and more over it would blink more if I add an image background to the form. Please Help..
Posted
Comments
tumbledDown2earth 16-Apr-13 7:59am    
is it wpf or winform?

1 solution

it is strange check you have done some paint event that is conflicting or some dynamic control which you are adjusting runtime on load event or in constructor...

if you want to not show flicker
means below code will show your form after it complete painting

put this property in your form and check effect
C#
protected override CreateParams CreateParams 
{
    get {
        CreateParams cp = base.CreateParams;
        cp.ExStyle = cp.ExStyle | 0x2000000;
        return cp;
    }
}
Happy Coding!
:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900