首页 > 代码库 > MDI窗体
MDI窗体
public partial class MySchool : Form
{
public MySchool()
{
InitializeComponent();
}
private void tsmiAddUser_Click(object sender, EventArgs e)
{
AddStudentForm addStudentForm = new AddStudentForm();//创建子窗体
addStudentForm.MdiParent = this;//设置子窗体的MDI父窗体
addStudentForm.Show();
}
private void tsmiSearchUser_Click(object sender, EventArgs e)
{
SearchStudentForm searchStudentForm = new SearchStudentForm();
searchStudentForm.MdiParent = this;
searchStudentForm.Show();
}
private void tsbAddUser_Click(object sender, EventArgs e)
{
AddStudentForm addStudentForm = new AddStudentForm();//创建子窗体
addStudentForm.MdiParent = this;//设置子窗体的MDI父窗体
addStudentForm.Show();
}
private void MySchool_Load(object sender, EventArgs e)
{
this.tsslStatus.Text = "当前登录的用户:"+Helper.account;
}
private void tsmiAbout_Click(object sender, EventArgs e)
{
ImageForm imageForm = new ImageForm();
imageForm.ShowDialog();//打开模式窗体
}
}