Why I got extra close button on mdi child window?

前端 未结 2 878
旧巷少年郎
旧巷少年郎 2021-01-11 19:27

I got a strange problem. My mdi child form has 2 close buttons and 2 maximized buttons.

A screenshot of the problem:

相关标签:
2条回答
  • 2021-01-11 19:42

    It's a bug in Winforms. This will happen when the child is created by the parent's constructor. Move it to the Load event.

    0 讨论(0)
  • 2021-01-11 20:07

    try this:

    childform.ControlBox = false;

    0 讨论(0)
提交回复
热议问题