Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to 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 16-Apr-13 2:37am
Comments
tumbledDown2earth at 16-Apr-13 7:59am
   
is it wpf or winform?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
protected override CreateParams CreateParams 
{
    get {
        CreateParams cp = base.CreateParams;
        cp.ExStyle = cp.ExStyle | 0x2000000;
        return cp;
    }
}
Happy Coding!
Smile | :)
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 6,769
1 Sergey Alexandrovich Kryukov 6,338
2 DamithSL 5,408
3 Manas Bhardwaj 4,816
4 Maciej Los 4,195


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 16 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100