WinForm 窗体与窗体相互嵌套

只要将要被潜逃的的窗体的TopLeve设置为Flase即可像普通的控件一样,被添加到另外一个窗体中,TopLeve:是否为*窗口,下面来看代码:

WinForm 窗体与窗体相互嵌套

public partial class TTForm : Form
{
public TTForm()
{
InitializeComponent();
weiboOfSina weibo = new weiboOfSina();
weibo.Dock = DockStyle.Fill;
weibo.FormBorderStyle = FormBorderStyle.None;
weibo.TopLevel = false;
this.Controls.Clear();
this.Controls.Add(weibo);
weibo.Show();
}
}
上一篇:hdu 5033 Building (单调栈 或 暴力枚举 )


下一篇:utf8 与 utf-8区别