tags:

views:

21

answers:

1

I created a control which has a picturebox inside of it. In my main form i had a picturebox then replace it with said control. I now have a problem with .Invalidate(). I need it to update the picturebox inside of the control. I have an OnPaint overload. But doing Invalidate on the control doesnt call the function. How do i get Invalidate()/Paint working with the usercontrol?

    protected override void OnPaint(PaintEventArgs pe)
    {
        pic.Invalidate();
    }
A: 

Try invalidating the control with .Invalidate(true), which is supposed to also invalidate child controls.

kbrimington