Black Screen appears while maximizing winform which has ElementHost as child

640 Views Asked by At

I added ElementHost as child to winform. While maximizing window, black screen appears before showing form.

public Form1()
{
    InitializeComponent();
    System.Windows.Forms.Integration.ElementHost host = new 
    System.Windows.Forms.Integration.ElementHost();
    host.Dock = DockStyle.Fill;
    Controls.Add(host);
}

Maximizing window behaviour works fine without element host as child. Provide possible solution to avoid black screen on maximizing winform having element host as child .

0

There are 0 best solutions below