[C#] 纯文本查看 复制代码
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Design;
namespace Form
{
public partial class Form_Design : Form
{
public Form_Design()
{
InitializeComponent();
}
private void Form_Design_Load(object sender, EventArgs e)
{
//引用System.Deisgn.dll
System.ComponentModel.Design.DesignSurface ds = new System.ComponentModel.Design.DesignSurface();
//开始加载窗体
ds.BeginLoad(typeof(Form));
Control designerContorl = (Control)ds.View;
designerContorl.Dock = DockStyle.Fill;
this.Controls.Add(designerContorl);
}
}
}