I am at a total loss on this issue
The Component is derived from System::Windows::Forms::UserControl and for display of an image I override WM_PAINT to draw an image using GDI between a BeginPaint and EndPaint. I also manage scrolling using Win API ShowScrollBar etc.
This all works very nicely -- the problem I am having is when I put the component control on form and then resize the form I get a nasty flicker. I have tried every combination of SetStyle in both my component class and the hosting form. I've also overriden OnPaintBackground in the hosting form and still I get flicker.
If I put a PictureBox on the form and set Docked full then load an image I do not see the same problem.
So what is it on my end I need to do to prevent the flicker?
Note: the windows painting code was written a few years ago and works in every window environement from VB to PB via ActiveX, WTL, MFC etc etc -- only in .NET have I had this problem.
OK I found a way around the flicker but of course this opened the door to other problems.
First in my control I set this->DoubleBuffered = true -- then I discontinued uses of BeginPaint and EndPaint
Now the problem ... with BeginPaint my PAINTSTRUCT rcPaint rectangle was filled with the smalled bounding rectangle needing to be updated. Much drawing optimizations are centered around this. With the Graphics Object I can find nothing that will be the equal of BeginPaint & EndPaint relative to obtaining a update rectangle.
Any help as always is appreciated.

