Windows Forms: using BackgroundImage slows down drawing of the Form's controls

后端 未结 6 1589
终归单人心
终归单人心 2020-12-08 02:33

I have a Windows Form (C# .NET 3.5) with a number of buttons and other controls on it, all assigned to a topmost Panel which spans the whole Form. For example, the hierarchy

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-08 03:10

    I solved same problem using PictureBox. Just add PictureBox to your container, choose "Dock it in parent container" (or property Dock = Fill) and set it's Image. It will looks just like BackGroundImage of the parent control.

提交回复
热议问题