Open
Description
ServerForm serverForm = new ServerForm(); serverForm.Show(dockPanel1); serverForm.DockTo(dockPanel1, DockStyle.Left); serverForm.DockPanel.DockLeftPortion = 0.2;
我使用这段代码的时候,运行后拖动悬浮的时候视图大小不是我设计的大小,
但是我使用以下代码时,虽然实现了上述悬浮时是设计的大小,但是每次打开视图都会在外面先显示一遍才会显示在容器里
ServerForm serverForm = new ServerForm(); serverForm.Show(dockPanel1,new Rectangle(100,100,serverForm.Width,serverForm.Height)); serverForm.DockTo(dockPanel1, DockStyle.Left); serverForm.DockPanel.DockLeftPortion = 0.2;