Flickering when drawing to Windows.Forms with Direct2
See the question and my original answer on StackOverflowWhat happens is Winforms is based on Win32's GDI which draws the background first (using default window color) when painting and you then call Clear(...) with some other color.
There are at least two solutions to this (you can use both without harm):
add this to your constructor (the control is drawn opaque and the background is not painted):
SetStyle(ControlStyles.Opaque,true);override OnPaintBackground and do nothing in it
protected override void OnPaintBackground(PaintEventArgs e) { // do nothing }
PS: that should be a full question, not an advice