-2

I was making a Form application on Visual Studio 2019 (Windows Forms) and then noticed the image was tearing when I was resizing the form. How can I fix it? Should I change one of the properties of the TabControl control?

Here's a photo showing what happened: Background Image Tearing

Note: the image seen in the photo is the background image of the Form control

1 Answers1

-1

Maybe you can try to override CreateParams method.

protected override CreateParams CreateParams
{
    get
    {
        if (Environment.OSVersion.Version.Major >= 6)
        {
            CreateParams cp = base.CreateParams;
            cp.ExStyle |= 0x02000000;
            return cp;
        }
        else
        {
            return base.CreateParams;
        }
    }
}
大陸北方網友
  • 3,696
  • 3
  • 12
  • 37