1. Create a winform project. A winform form1 is generated by default.
2. Reference-> Add reference-> browse-> weifenluo. winformsui. Docking. dll.
3. Form attribute ismdicontainer: True.
4. Right-click the Toolkit and choose items>. NET components> browse> weifenluo. winformsui. Docking. dll> dockpanel in the Toolkit.
5. Drag the dockpanel to form form1 and set the dock attribute. I set fill.
Dock form:
1. Create a New winform form2.
2. InCodeThe modified form inherits from dockcontent.
Public partial class form2: dockcontent
3. display the docking form in the main form form1.
Private void form1_load (Object sender, eventargs E)
{
Form2 form2 = new form2 ();
Form2.show(this.doc kpanel1 );
Form2.dockto(this.doc kpanel1, dockstyle. Left );
}
Weifenluo. winformsui. Docking. dll is a class library of the dockpanel suite open-source project.
Studio functions such as window dock and drag-and-drop. The project: http://sourceforge.net/projects/dockpanelsuiteArticleReprinted from: http://www.cnblogs.com/masterfy/archive/2009/06/02/1494593.html
1. Create a winform project. A winform form1 is generated by default.
2. Reference-> Add reference-> browse-> weifenluo. winformsui. Docking. dll.
3. Form attribute ismdicontainer: True.
4. Right-click the Toolkit and choose items>. NET components> browse> weifenluo. winformsui. Docking. dll> dockpanel in the Toolkit.
5. Drag the dockpanel to form form1 and set the dock attribute. I set fill.
Dock form:
1. Create a New winform form2.
2. Modify the form in the code to inherit from dockcontent.
Public partial class form2: dockcontent
3. display the docking form in the main form form1.
Private void form1_load (Object sender, eventargs E)
{
Form2 form2 = new form2 ();
Form2.show(this.doc kpanel1 );
Form2.dockto(this.doc kpanel1, dockstyle. Left );
}
Weifenluo. winformsui. Docking. dll is a class library of the dockpanel suite open-source project.
Studio functions such as window dock and drag-and-drop. This project: http://sourceforge.net/projects/dockpanelsuite Article Reprinted from: http://www.cnblogs.com/masterfy/archive/2009/06/02/1494593.html