Thanks degac.
I had a play with SendMessageA and the WM_SETREDRAW flag but I can't get it to work as desired.
Locking the redrawing of the window after drawing the graphics means the panels border and contained graphics are not drawn after another window passed over the top.
For the time being I'm calling gdi.DrawGraphics DrawTest which executes the DrawTest() function when an event occurs such as EVENT_APPRESUME , EVENT_WINDOWACTIVATE, EVENT_WINDOWMOVE
It's by no means perfect though. The InvertArea screws up for starters. Plus, once the window is inactive there is no notification to re-draw the graphics.
I had a play with SendMessageA and the WM_SETREDRAW flag but I can't get it to work as desired.
Locking the redrawing of the window after drawing the graphics means the panels border and contained graphics are not drawn after another window passed over the top.
For the time being I'm calling gdi.DrawGraphics DrawTest which executes the DrawTest() function when an event occurs such as EVENT_APPRESUME , EVENT_WINDOWACTIVATE, EVENT_WINDOWMOVE
It's by no means perfect though. The InvertArea screws up for starters. Plus, once the window is inactive there is no notification to re-draw the graphics.