Link to home
Start Free TrialLog in
Avatar of ssiegwald
ssiegwaldFlag for United States of America

asked on

C# MDI with BackgroundImage Flickers when child moves

I have an MDI with a jpg as its background image.  As I move the child windows around within the MDI, the background image blinks and flickers, and my desktop also joins in.  I have the form set to doublebuffered, but it still flashes.
Avatar of Craig Wagner
Craig Wagner
Flag of United States of America image

Try adding this code to the Form_Load event.

this.SetStyle(ControlStyles.DoubleBuffer |
      ControlStyles.UserPaint |
      ControlStyles.AllPaintingInWmPaint,
      true);
The answer I provided is the correct one.
ASKER CERTIFIED SOLUTION
Avatar of Craig Wagner
Craig Wagner
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ssiegwald

ASKER

it was the only answer.