Winform知识点

C#知识点:

1.sendtoback()和bringtofront()

如下的代码:
 button2.Dock = DockStyle.Top;
 button1.SendToBack();
 button1.Dock = DockStyle.Top;
 button3.Dock = DockStyle.Bottom;
运行后,3个button的顺序始终为:
button1
button2
button3
如果代码改为:
 button2.Dock = DockStyle.Top;
 button1.Dock = DockStyle.Top;
 button3.Dock = DockStyle.Bottom;

运行后,3个button的顺序始终为:
button2
button1
button3

SendToBack() 将控件移到 Z 顺序的后面。
BringToFront()将控件移到 Z 顺序的前面。

Winform知识点

上一篇:Android开发 APP闪退Fragment重叠泄露问题


下一篇:【Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (72)】报错问题解决办法