I have a WinForm where I override the OnPaint, this form is a MDI parent. The OnPaint is however not triggered even when the WinForm is shown with a child? I have tried to use Invalidate and the Update but does not trigger the OnPaint eather?
I have tried the Paint event but its the same here?
Any idea?
When you set
Form.IsMdiContainer, it actually just adds aMdiClientcontrol to the form. Your child forms are actually displayed within the MdiClient control and not the form itself. Your form’s Paint event is being raised, but the MdiClient is docked in the form so you don’t see it. You need to access the MdiClient’s paint event instead.